minor refactorization of the map generation procces to better adhear to the single resplosiblity principle