Adding jshint to unit tests, cleaned up code