Rewriting to new codegen.