Fix all issues brought up by JSHint.

Mainly add in missing semicolons, changed `==` to `===` and `!=` to
`!==`. Some minor style tweaks may have also been made in between. Some
whitespace was removed from the ends of lines as well.