fixed jshint and unit tests