style cleanup: move markerEvents right before for loop