relax jshint and fix remaining warnings and errors