more fixes for code: using new map API and fixes for map unravelling