cleanup to support code generation.