Implement grading 

Fixes #12 
Fixes #4