Clean up code generation