clean up code for map utils