Added Gruntfile with jshint and corrected most js errors