Changed var setup in code generator