Moved map generation code into own package.