         self.tableView.reloadData()
       }
       .onError { (error) in
-        let alert = UIAlertController(title: "Network connection required!", message: error.localizedDescription, preferredStyle: .alert)
-        alert.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: nil))
-        self.present(alert, animated: true, completion: nil)
+        self.showError(message: error.localizedDescription)
     }
   }
-
+  
+  fileprivate func showError(message: String) {
+    let alert = UIAlertController(title: "Network connection required!", message: message, preferredStyle: .alert)
+    alert.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: nil))
+    self.present(alert, animated: true, completion: nil)
+  }
+  
+  //MARK: TableView
+  
   override func numberOfSections(in tableView: UITableView) -> Int {
     return users.count > 0 ? 1 : 0
   }

      // Add probability to fail
      .then{ (users) -> [User] in
        self.reloadCount += 1
        if 0 == self.reloadCount % 5 {
          self.title = "Error simulation"
          throw ViewControllerError.simulatedError
        }
        self.title = "Pull \(5 - self.reloadCount % 5) more time to get error"
        return users
      }
      .onComplete { (_) in

      // Add delay for better illustration
      .then{ (users) -> Promise<[User]> in
        let promise = Promise<[User]>()
        DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + delay) {
          promise.resolve(result: users)
        }
        return promise
