Moved from a flag based memory allocator to a pointer one