Eliminated almost all global variable in CourseSelectionCore.