Turned removeMarkers into a called function instead of a trigger that depends on the loop.  Similarly updated the clearStrokes function.