Maps changed to unordered_maps, loop post-increments changed to pre-increments.