     func didAddNewClass() {
         //New class added from popover view controller
         getData()
+        self.saveClasses()
         tableView.reloadData()
     }
     

            parseScheduleJSON()
        } else {
            //Not first launch
            let data = defaults.object(forKey: "classes") as! Data
            classes = NSKeyedUnarchiver.unarchiveObject(with: data) as? [JHSchoolClass]
        }
        classes = sortClassesByStartTime(classes: classes!)
        classesByDay = sortClassesByDay(classes: classes!)

    }
    
    func dayGivenIndexPath(indexPath: IndexPath) -> String {
        //Day given an index path of a class
        return Array(classesByDay.keys).reversed()[(indexPath.section)] as String
    }
    
    func loadClasses() {
        //Loads classes from defaults
        let data = defaults.object(forKey: "classes") as! Data
        classes = NSKeyedUnarchiver.unarchiveObject(with: data) as? [JHSchoolClass]
    }
    
    func saveClasses() {
        //Save classes from defaults
        let data: Data = NSKeyedArchiver.archivedData(withRootObject: classes!)
        defaults.set(data, forKey: "classes")
    }
    
    func indexForIndexPathWithManySections(indexPath: IndexPath) -> Int {
