Addclass_teacher code cleanup