Memory usage when going into the MIR stage is now down to 20mb.