Moved map generation code to seperate files.