tidied up map generation code