mapGen seperated into library and cli frontend

mapGen has been seperated into a library and a cli frontend. This should
allow other frontends to be used including other projects.