Moved the major variable from GenerateSchedule to UpdateSchedule