tidied up tests
adds jshintrc and tidies spec.js to comply