Clean up code generator some