         self.viewState = state
     }
     
-    public func mapView(mapView: MKMapView, didUpdateUserLocation userLocation: MKUserLocation) {
-        updateState(forMapView: mapView, animated: true)
-    }
-    
-    public func mapView(mapView: MKMapView, didChangeUserTrackingMode mode: MKUserTrackingMode, animated: Bool) {
-        updateState(forMapView: mapView, animated: true)
-    }
-    
-    public override func prepareForInterfaceBuilder() {
-        self.transitionToState(.TrackingLocationOff, animated: false)
-    }
-    
     public func getImage(named: String) -> UIImage? {
         return UIImage(named: named, inBundle: NSBundle(forClass: self.dynamicType), compatibleWithTraitCollection: nil)
     }
-}
-
-extension UIView {
-    
-    func setHidden(hidden: Bool, animated: Bool, completion: (() -> Void)? = nil) {
-        guard self.hidden != hidden else {
+    
+    // MARK: Interface Builder
+    
+    public override func prepareForInterfaceBuilder() {
+        self.backgroundColor = UIColor.greenColor()
+        //self.transitionToState(.TrackingLocationOff, animated: false)
+    }
+    
+    // MARK: Button visibility
+    
+    // This would be as extension methods but there was some issues when importing
+    // such a framework and using it as extension.
+    
+//}
+//
+//extension UIView {
+    
+    func setHidden(button: UIButton, hidden: Bool, animated: Bool, completion: (() -> Void)? = nil) {
+        guard button.hidden != hidden else {
             completion?()
             return
         }
         
-        if self.hidden {
-            self.alpha = 0.0
-            self.hidden = false
+        if button.hidden {
+            button.alpha = 0.0
+            button.hidden = false
         }
         
         let anim: () -> Void = {
-            self.alpha = hidden ? 0.0 : 1.0
+            button.alpha = hidden ? 0.0 : 1.0
         }
         
         let compl: ((Bool) -> Void) = { _ in
-            self.hidden = hidden
+            button.hidden = hidden
             completion?()
         }
         

        }
    }
    
    func hide(animated: Bool, completion: (() -> Void)? = nil) {
        setHidden(true, animated: animated, completion: completion)
    }
    
    func show(animated: Bool, completion: (() -> Void)? = nil) {
        self.superview?.bringSubviewToFront(self)
        setHidden(false, animated: animated, completion: completion)
    }
}

    }
    
    private func transitionToState(state: ViewState, animated: Bool) {
        
        switch state {
        case .RetrievingLocation:
            self.hide(locationOffButton, animated: animated)
            self.hide(locationButton, animated: animated) {
                self.trackingActivityIndicator.hidden = false
                self.trackingActivityIndicator.startAnimating()
            }
        case .TrackingLocation:
            self.trackingActivityIndicator.stopAnimating()
            self.hide(locationOffButton, animated: animated)
            self.show(locationButton, animated: animated)
        case .TrackingLocationOff:
            self.trackingActivityIndicator.stopAnimating()
            self.hide(locationButton, animated: animated)
            self.show(locationOffButton, animated: animated)
        default:
            break
        }
