use jshint and fix some warnings
fix broken test
fix stupid jshint warning