added linting to JS in Gruntfile and tidied up some old stuff