Tighten jshint rules, remove unused code