         }
         
         self.tableView.scrollToRowAtIndexPath(NSIndexPath(forRow: 0, inSection: 0), atScrollPosition: UITableViewScrollPosition.Top, animated: true)
-     }
-    
-    override func viewWillAppear(animated: Bool) {
-        for scheduleCell in tableView.visibleCells as! [ScheduleTableViewCell] {
-            guard let indexPath = tableView.indexPathForCell(scheduleCell) else {
-                return
-            }
-            
-            var scheduleItem: Schedule? = nil
-            
-            if searchController.active && searchController.searchBar.text != "" {
-                scheduleItem = filteredScheduleItems[indexPath.row]
-            } else if scheduleItems[indexPath.section].count > indexPath.row {
-                scheduleItem = scheduleItems[indexPath.section][indexPath.row]
-            }
-            
-            if let foundScheduleItem = scheduleItem {
-                scheduleCell.starButton.selected = foundScheduleItem.starred
-            }
-        }
-        
-        super.viewWillAppear(animated)
-    }
-    
-    override func viewDidAppear(animated: Bool) {
-        if tableView.numberOfRowsInSection(0) > 0 {
-            scrollToNearestCell()
-        }
-
-        super.viewDidAppear(animated)
-    }
-
-    // MARK: - Table view data source
-
+    }
+    
+    // MARK: - UITableViewDatasource
+    
     override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
         if searchController.active && searchController.searchBar.text != "" {
             return 1

    
    func sortScheduleItems(starredOnly starredOnly: Bool) {
        var thursdayShows = [Schedule](), fridayShows = [Schedule](), saturdayShows = [Schedule](), sundayShows = [Schedule]()

        for item in DataStore.sharedInstance.scheduleItems {
            if starredOnly && item.starred == false {
                continue

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        if DataStore.sharedInstance.scheduleItems.count == 0 {
            DataStore.sharedInstance.updateScheduleItems() { _ in
                self.tableView.reloadData()
                
                self.sortScheduleItems(starredOnly: false)
                
                self.scrollToNearestCell()
            }
        } else {
            sortScheduleItems(starredOnly: false)
            
            scrollToNearestCell()
        }
        
        searchController.searchResultsUpdater = self
        searchController.dimsBackgroundDuringPresentation = false
        
        searchController.searchBar.tintColor = UIColor.lightCharcoal()
        searchController.searchBar.delegate = self
        
