more cleanup on map reading