Seperated map generation code into its own class