Better implementation of grader.js, using asynchronous calls and callbacks.