Enable JSHINT's `unused` option. It caught a bunch of suspicious stuff which is fixed in this commit.