 
 // MARK: DZN Empty Data Set Source
 extension HomeViewController: DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
-    func verticalOffset(forEmptyDataSet scrollView: UIScrollView!) -> CGFloat {
+    func verticalOffset(forEmptyDataSet scrollView: UIScrollView) -> CGFloat {
         return -80
     }
 
-    func image(forEmptyDataSet scrollView: UIScrollView!) -> UIImage! {
-        if activityIndicator == nil {
-            return isNetworkDown ? #imageLiteral(resourceName: "noInternet") : #imageLiteral(resourceName: "emptyPin")
-        }
-        return nil
-    }
-
-    func description(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! {
-        if activityIndicator == nil {
-            let title = isNetworkDown ? "No Network Connection" : "Location Not Found"
-            let attrs = [NSAttributedString.Key.foregroundColor: UIColor.mediumGrayColor]
-            return NSAttributedString(string: title, attributes: attrs)
-        }
-        return nil
-    }
-
-    func buttonTitle(forEmptyDataSet scrollView: UIScrollView!, for state: UIControl.State) -> NSAttributedString! {
-        if activityIndicator == nil {
-            let title = "Retry"
-            let attrs = [NSAttributedString.Key.foregroundColor: UIColor.tcatBlueColor]
-            return NSAttributedString(string: title, attributes: attrs)
-        }
-        return nil
-    }
-
-    func setUpActivityIndicator() {
-        activityIndicator = UIActivityIndicatorView(style: UIActivityIndicatorView.Style.gray)
-        if let activityIndicator = activityIndicator {
-            view.addSubview(activityIndicator)
-            activityIndicator.snp.makeConstraints { (make) in
+    func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
+        if loadingIndicator != nil {
+            return nil
+        }
+        return isNetworkDown ? #imageLiteral(resourceName: "noInternet") : #imageLiteral(resourceName: "emptyPin")
+    }
+
+    func description(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
+        if loadingIndicator != nil {
+            return nil
+        }
+        let title = isNetworkDown ? "No Network Connection" : "Location Not Found"
+        let attrs = [NSAttributedString.Key.foregroundColor: UIColor.mediumGrayColor]
+        return NSAttributedString(string: title, attributes: attrs)
+    }
+
+    func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
+        if loadingIndicator != nil {
+            return nil
+        }
+        let title = "Retry"
+        let attrs = [NSAttributedString.Key.foregroundColor: UIColor.tcatBlueColor]
+        return NSAttributedString(string: title, attributes: attrs)
+    }
+
+    func setUpLoadingIndicator() {
+        loadingIndicator = LoadingIndicator()
+        if let loadingIndicator = loadingIndicator {
+            view.addSubview(loadingIndicator)
+            print("added loading indicator")
+            loadingIndicator.snp.makeConstraints { (make) in
                 make.centerX.equalToSuperview()
                 make.centerY.equalToSuperview()
+                make.width.equalTo(40)
+                make.height.equalTo(40)
             }
         }
     }
 
     func emptyDataSet(_ scrollView: UIScrollView!, didTap didTapButton: UIButton!) {
-        setUpActivityIndicator()
-        if let activityIndicator = activityIndicator {
+        setUpLoadingIndicator()
+        if let loadingIndicator = loadingIndicator {
             tableView.reloadData()
-            activityIndicator.startAnimating()
-
-            // Have activity indicator time out after one second
+
+            // Have loading indicator time out after one second
             let delay = 1
             DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(delay)) {
                 // if the empty state is the "Location Not Found" state, clear the text in the search bar

                    self.searchBar.text = nil
                    self.searchBar.placeholder = Constants.Phrases.searchPlaceholder
                }
                activityIndicator.stopAnimating()
                self.activityIndicator = nil
                self.tableView.reloadData()
            }
        }

            // Dismiss current banner, if any
            banner?.dismiss()
            banner = nil
            // Dismiss current loading indicator, if any
            loadingIndicator?.removeFromSuperview()
            loadingIndicator = nil

            switch reachability.connection {
            case .none:
