Refactoring grader.js to enable reading from URI