some codegen cleanup