cleaned-up functional grader.js
grader.js refactored