Changed return format of getAllCourses to dictionary of arrays