         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.
     }
+}
 
-    // MARK: - Internal methods
+// MARK: - Internal methods
+
+internal extension LocationPickerController {
 
     func didTapCancelButton() {
         self.dismissViewControllerAnimated(true, completion: nil)

        self.mapView.setCenterCoordinate(self.mapView.userLocation.coordinate, animated: true)
        self.currentButton.enabled = false
    }

    // MARK: - MKMapView delegate

    func mapView(mapView: MKMapView, regionWillChangeAnimated animated: Bool) {
        guard self.isInitialized else {
            return
        }
        self.currentButton.enabled = true
    }

    func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
        guard self.isInitialized else {
            return
        }
        self.pointAnnotation.coordinate = mapView.region.center
    }

    // MARK: - CLLocationManager delegate

    func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
        switch status {

typealias successClosure = (CLLocationCoordinate2D) -> Void
typealias failureClosure = (NSError) -> Void

class LocationPickerController: UIViewController {

    var mapView: MKMapView!
    var pointAnnotation: MKPointAnnotation!
