CounterMap documented and refactored