Added in regrading functionality

Also added automatic grading after training completes

Many code review edits