JSHint fixes

I redid the changes as a branch off of `master` instead of `ui_scaffolding`, so that you can see exactly what's changed for this pull request