Improved map generation algorithm.