Hotspot in valuemap constructor reduced by making valuemap more efficient (now extends HashMap rather than aggregating one).