     
     @IBAction func closeSearch(_ sender: Any) {
         searchBar?.endEditing(true)
-        if let currentSearch = self.currentSearch, !isDefaultSearch(currentSearch) {
-            searchBar?.text = currentSearch.string ?? currentSearch.localizedDescription
-        } else {
-            searchBar?.text = nil
-        }
-        let searchText = searchBar?.text
-        if searchText == nil || searchText?.trimmingCharacters(in: .whitespacesAndNewlines) == "" {
-            performDefaultSearch(withRegion: nil)
-        }
+        updateSearchBarText()
+        performDefaultSearchIfNecessary(withRegion: nil)
     }
     
     // MARK: - UISearchBarDelegate

            }
            
            updateSearchFilterTitle()
            performSearch(search)
            
            switch search.type {

        }
    }
    
    
    private func updateSearchBarText(forSearch search: PlaceSearch) {
        if (isDefaultSearch(search)) {
            searchBar?.text = nil
        } else {
            searchBar?.text = search.string ?? search.localizedDescription
        }
        
    }
    
    private func updateSearchBarText() {
        guard let search = currentSearch else {
            searchBar?.text = nil
            return
        }
        updateSearchBarText(forSearch: search)
    }

    
    @IBAction func toggleSearchFilterDropDown(_ sender: Any) {
        self.isSearchFilterDropDownShowing = !isSearchFilterDropDownShowing
    }
