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!
I'm a bit opposed to indenting all the code inside the closure/pseudomodule `(function(){})()` wrapper--makes it just a little harder to read, extends the lines by 2 unnecessary characters, all for no benefit (in my eyes).