windowstats refactor / cleanup
just a few stylistic changes

jshint is much happier now :)
Merge branch 'master' of github.com:kuzetsa/gekko into portfolio.debug