     }
 }
 
+// MARK: - Activity Indicator
+extension GSRController {
+    func prepareLoadingView() {
+        loadingView = UIActivityIndicatorView(style: .whiteLarge)
+        loadingView.color = .black
+        loadingView.isHidden = false
+        view.addSubview(loadingView)
+        loadingView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
+        loadingView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
+        loadingView.translatesAutoresizingMaskIntoConstraints = false
+    }
+
+    func startLoadingViewAnimation() {
+        if loadingView != nil && !loadingView.isHidden {
+            loadingView.startAnimating()
+        }
+    }
+
+    func stopLoadingViewAnimation() {
+        self.loadingView.isHidden = true
+        self.loadingView.stopAnimating()
+    }
+}
 // MARK: - Bar Button Refresh + Handler
 extension GSRController: GSRBookable {
     fileprivate func refreshBarButton() {

    }

    @objc fileprivate func handleBarButtonPressed(_ sender: Any) {
//        switch viewModel.state {
//        case .loggedOut:
//            if viewModel.getSelectedLocation().service == "wharton" {
//                presentWebviewLoginController()
//            } else {
//                presentLoginController()
//            }
//            break
//        case .loggedIn:
//            let message = "Are you sure you wish to log out?"
//            let alert = UIAlertController(title: "Confirm Logout",
//                                          message: message,
//                                          preferredStyle: .alert)
//            let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
//            alert.addAction(cancelAction)
//            alert.addAction(UIAlertAction(title: "Confirm", style: .default, handler:{ (UIAlertAction) in
//                DispatchQueue.main.async {
//                    GSRUser.clear()
//                    self.refreshBarButton()
//                }
//            }))
//            present(alert, animated: true)
//            break
//        case .readyToSubmit(let booking):
//            submitPressed(for: booking)
//            break
//        }
        if let booking = viewModel.getBooking() {
            submitPressed(for: booking)
        } else {


    fileprivate var viewModel: GSRViewModel!
    
    var loadingView: UIActivityIndicatorView!

    var startingLocation: GSRLocation!

    override func viewDidLoad() {
