Misc performace improvements. More local variables. Map now generates up to 2x as fast as before. Prints map generation time.
Merge pull request #1 from Splizard/master

Performance improvements by Splizard.