Refatactored grader.js some more