Minor changes to grader, tidied up code