         resultsTableController.foundPeople = searchResults
         resultsTableController.tableView.reloadData()
     }
-    
-    
-    // MARK: - UIStateRestoration
-
-    override func encodeRestorableStateWithCoder(coder: NSCoder) {
-        super.encodeRestorableStateWithCoder(coder)
-        coder.encodeObject(title, forKey: OSTContactsViewController.TitleKey)
-        
-        let searchDisplayControllerIsActive: Bool = searchController.active
-        coder.encodeBool(searchDisplayControllerIsActive, forKey: OSTContactsViewController.SearchControllerIsActiveKey)
-        
-        if searchDisplayControllerIsActive {
-            coder.encodeBool(searchController.searchBar.isFirstResponder(), forKey: OSTContactsViewController.SearchBarIsFirstResponderKey)
-        }
-        
-        coder.encodeObject(searchController.searchBar.text, forKey: OSTContactsViewController.SearchBarTextKey)
-    }
-    
-    override func decodeRestorableStateWithCoder(coder: NSCoder) {
-        super.decodeRestorableStateWithCoder(coder)
-        title = coder.decodeObjectForKey(OSTContactsViewController.TitleKey) as? String
-        searchControllerWasActive = coder.decodeBoolForKey(OSTContactsViewController.SearchControllerIsActiveKey)
-        searchControllerSearchFieldWasFirstResponder = coder.decodeBoolForKey(OSTContactsViewController.SearchBarIsFirstResponderKey)
-        searchController.searchBar.text = coder.decodeObjectForKey(OSTContactsViewController.SearchBarTextKey) as? String
-    }
 
 }

    
    var resultsTableController: OSTResultsTableController
    var searchController: UISearchController
    
    var searchControllerWasActive = false
    var searchControllerSearchFieldWasFirstResponder = false
    
    static let TitleKey = "ViewControllerTitleKey"
    static let SearchControllerIsActiveKey = "SearchControllerIsActiveKey"
    static let SearchBarTextKey = "SearchBarTextKey"
    static let SearchBarIsFirstResponderKey = "SearchBarIsFirstResponderKey"
    
    required init(coder aDecoder: NSCoder) {
        people = OSTPerson.allObjectsInRealm(realm).sortedResultsUsingProperty("fullName", ascending: true)

            realmNotification = realm.addNotificationBlock({ [weak self](notificationString, realm) -> Void in
                self?.tableView.reloadData()
            })
        }
    }
    
