refactored tests (and test-related changes) to conform to jshint standards