Code optimization

Less code for defining $mapname and cleaner printing of the map name on different places.