Switched from map (tree) to unordered_map (hashtable).