Cleanups to the new memory class
The memory modification is now re-windable