     super.viewDidLoad()
 
     self.tableView.dataSource = self.dataSource
-
-    self.refreshControl = UIRefreshControl()
-    self.refreshControl!.addTarget(self, action: #selector(self.tableViewPulledToRefresh(_:)), forControlEvents: .ValueChanged)
-  }
-
-  func tableViewPulledToRefresh(refreshControl: UIRefreshControl) {
-    self.refreshTimer?.invalidate()
-
-    // Simulating data loading, 10 secs to be sure that there's enough time to Reveal the view before it ends
-    self.refreshTimer = NSTimer.scheduledTimerWithTimeInterval(10, target: self, selector: #selector(self.didLoadDummyData(_:)), userInfo: nil, repeats: false)
-  }
-
-  func didLoadDummyData(timer: NSTimer) {
-    self.refreshControl?.endRefreshing()
+    
+    self.setupRefreshControl()
   }
 
   private static func footerLabelWithText(text: String?) -> UILabel {

    return NSString(format: NSLocalizedString("%lu Countries", comment: "CountriesViewController footer format"), count) as String
  }
}


private extension CountriesViewController {
  static func configureCell(cell: BasicCell, object: Country) {
    cell.accessoryType = .None
    
    cell.titleLabel.text = object.name
    cell.subtitleLabel.text = object.capital
  }
