Adding most of the functionality for the ExamController