Changes to grading algorithm.