Extracted map generation to separate class.