Implemented a memory manager