Fixed bugs in grader.js URL handling and neatified.