Add missing changes to codegen branch