Cleaned up leaked global vars and added .jshintrc