CodeGen makeover