Some improvements to mapgen