Added jshint - removed all errors, removed global change from module, changed all tests to not use global