Consolidated map-generation code into a function mapgen
Do not use 7kaa's set_extra_handler