cleanup + some changes to support eventually using our own map rather than a GenericSTM'd map structure