                 self.currentFilter = nil
                 self.searchForProducts()
             })
-            filterMenu.addAction(removeFilterAction)
-        }
-        
-        let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: {
-            (alert: UIAlertAction!) -> Void in
-        })
-        
-        filterMenu.addAction(cancelAction)
-        
-        self.present(filterMenu, animated: true, completion: nil)
+            alertController.addAction(removeFilterAction)
+        }
+        self.present(alertController, animated: true, completion: nil)
     }
     
     func showSubFilter(withFacets facets: [RCHSearchFacet]) {
-        let filterMenu = UIAlertController(title: nil, message: "Choose Filter", preferredStyle: .actionSheet)
-        
-        for facet in facets {
-            let brandAction = UIAlertAction(title: facet.title, style: .default, handler: {
-                (alert: UIAlertAction!) -> Void in
-                self.currentFilter = facet
-                self.searchForProducts()
-            })
-            filterMenu.addAction(brandAction)
-        }
-
-        
-        let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: {
-            (alert: UIAlertAction!) -> Void in
-        })
-        
-        filterMenu.addAction(cancelAction)
-        
-        self.present(filterMenu, animated: true, completion: nil)
+        
+        let titles = facets.map( { $0.title })
+        
+        let alertController = UIAlertController.createFacetActionSheet(withTitle: titles) { index in
+            let facetSelected = facets[index]
+            self.currentFilter = facetSelected
+            self.searchForProducts()
+        }
+        self.present(alertController, animated: true, completion: nil)
     }
     
     @IBAction func sortPickerDoneSelected(_ sender: AnyObject) {

import UIKit

private let reuseIdentifier = "productCell"

enum SortingOptions: String {
    case priceLowest = "Price Low to High"

    }
    
    @IBAction func filterSelected(_ sender: AnyObject) {
        
        let titles = searchFacets.map({ $0.key })
        
        let alertController = UIAlertController.createFacetActionSheet(withTitle: titles) { index in
            guard let facetSelected = self.searchFacets[titles[index]] else {
                return
            }
            self.showSubFilter(withFacets: facetSelected)
        }
        
        if currentFilter != nil {
