WIP map impl refactor for memory releasing