Added clearMap function to clean-up before redrawing