Flesh out memory manager code, add support for persistent state load/writes