Clean up generated code