Abstracting out map generation to a module. Refacoring entire generation process, this commit, against best practice is not complete, and is currently broken.