cleanup generated code