Implemented unit grade calculation for courses. (needs cleaning up)