more cleanup

- moves static helpers to outermost closure
- some code cleanup
- some jshint+style cleanup:
  - don't redeclare variables
  - remove "laxbreak" instances
  - enforce camelCase
  - don't indent switch cases
- remove unnecessary `break;` from switch default cases
- :retab (tabs to spaces) html