some work on refactoring the code generator