Memmap: Cleanup code

This shouldn't have any effect on the behavior of the memmap, it should just be more readable now.