Add unit tests, fix jshint errors

Added unit tests for the resulting configuration, added a .jshintrc file and fixed the jshint errors.
variable name?