cleanup table codegen