Edited codegen

Working on fixing