Refactored GradePanel to make it easier to work with.