More work on code generator and cleaning up directory