refactoring code generator - INCOMPLETE
completed major refactoring - removed partial functions in code generator by adding an intermediate representation very close to abstract syntax, but better organized