clearing redundant stuff from the map