added required checks
Fixed bugs in grader.js and index.html