JSHint

I found some minor issues by applying [JSHint](http://jshint.com/), such as `!===` being preferable to `!=` when comparing against singletons like `null`, `0`, and `""`.

JSHint found a few more errors, but I let them alone, as they require more thought.