This is a Work-in-Progress, merged current master and some non-trivial merging issues and stylistic touch-ups need to be applied.