     }
 
     func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
+
+        guard let section = Section(rawValue: indexPath.section) else {
+            fatalError("Invalid section!")
+        }
+
+        if indexPath.row == 0 {
+
+            let cell = tableView.dequeueReusableCellWithIdentifier(searchSectionTitleCellID) as! SearchSectionTitleCell
+
+            switch section {
+            case .Local:
+                cell.sectionTitleLabel.text = NSLocalizedString("Friends", comment: "")
+            case .Online:
+                cell.sectionTitleLabel.text = NSLocalizedString("Users", comment: "")
+            }
+
+            return cell
+        }
+
         let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) as! SearchedContactsCell
         return cell
     }
 
-    private func friendAtIndexPath(indexPath: NSIndexPath) -> User? {
-        let index = indexPath.row
+    private func friendAtIndex(index: Int) -> User? {
         //let friend = searchControllerIsActive ? filteredFriends?[safe: index] : friends[safe: index]
         let friend = filteredFriends?[safe: index]
         return friend


    func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {

        guard let cell = cell as? SearchedContactsCell else {
            return
        }

            tableView.deselectRowAtIndexPath(indexPath, animated: true)
        }

        guard indexPath.row > 0 else {
            return
        }

        hideKeyboard()

        guard let section = Section(rawValue: indexPath.section) else {
            return
        }

        let itemIndex = indexPath.row - 1

        switch section {

        case .Local:

            if let friend = friendAtIndex(itemIndex) {
                performSegueWithIdentifier("showProfile", sender: friend)
            }

        case .Online:

            let discoveredUser = searchedUsers[itemIndex]
            performSegueWithIdentifier("showProfile", sender: Box<DiscoveredUser>(discoveredUser))
        }
    }
