Moved some stuff into its own function
Cleaned up grader into separate functions