Removed some "ifs" in the transformer
Codegen ensure