Remove obsolete code
Add jshint config, fix warnings
More linting (equality vs identity comparisons)