Messing about
unfinished state, big rewrite of CodeGen parts