Get the project passing jshint

Lots of small style tweaks here. Consider these proposed rules: this is a good opportunity to voice your objection to any you don't like!