Minor performance-based modifications.
Correctly size map prior to putting into it
Merge pull request #2349 from Leperous/master

Minor performance-based Map/Reduce modifications.