Lint

Working towards removing all JSHint errors so that we can check that as a test for future PRs.
I fixed this on master, hopefully it merges nicely.