update the stat poller and fix some jshint issues