added gruntFile and cleaned up some code based on jshint.