Added new mmu routines from old code, reworked some that would obviously be wrong