Add new jshint options and fix issues, remove dead code