Added clearMap function