Added unit tests, fixed jshint scripts