Wip cleanup memory store

Should be 1 iff it was present in the map.