CodeFormatter Update

See TODO file for what's missing / in progress. 

The testcases which fail are due to points noted there (mainly Comments / XML nodes).