     private var sortedEngines = [OpenSearchEngine]()
     private var suggestClient: SearchSuggestClient?
     private var searchSuggestions = [String]()
-    //Copy from HistoryViewController
-    //Since we create profile in didFinishLaunchingWithOptions and hundreds of class instance access profile, why wouldn't we make profile singleton?
     var profile: Profile!
-    private var history: Cursor? = nil
+    private var history: Cursor?
     
     var searchEngines: SearchEngines? {
         didSet {

    }
    
    func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        if let currentSection = SearchListSection(rawValue: section) {
            return currentSection.description
        }
        return ""
    }
    
    func numberOfSectionsInTableView(tableView: UITableView) -> Int {

extension SearchViewController: UITableViewDelegate {
    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        var url: NSURL?
        if let currentSection = SearchListSection(rawValue: indexPath.section) {
            switch currentSection {
            case .SuggestedSites:
                let suggestion = searchSuggestions[indexPath.row]

                // Assume that only the default search engine can provide search suggestions.
                url = searchEngines?.defaultEngine.searchURLForQuery(suggestion)
            case .BookmarksAndHistory:
                if var hasHistory = history {
                    if let site = hasHistory[indexPath.row] as? Site {
                        url = NSURL(string: site.url)
                    }
                }
            case .Search:
                let engine = sortedEngines[indexPath.row - searchSuggestions.count]
                url = engine.searchURLForQuery(searchQuery)
            }
        }

        if let url = url {
