Update MIPS code generator to work with refactored environment