Several fixes and changes in order to get grading workin