moved things around and renamed a function
clean up js, do not process counters if also asked to request counters