 			completion?()
 		}
 		
-		let animations: () -> () = {
-			for (_, view) in self.viewStore {
-				view.alpha = 0.0
-			}
-		}
-		
-		if animated {
-			UIView.animateWithDuration(0.3, animations: animations, completion: animationCompletion)
-		} else {
-			animationCompletion(true)
-		}
-	}
+        animateChanges(animated: animated, animations: animations, animationCompletion: animationCompletion)
+    }
 	
+    private func animateChanges(#animated: Bool, animations: () -> (), animationCompletion: (Bool) -> ()) {
+        if animated {
+            UIView.animateWithDuration(0.3, animations: animations, completion: animationCompletion)
+        } else {
+            animationCompletion(true)
+        }
+    }
 }

			self.view.addConstraints(vConstraints)
		}
		
		let animationCompletion: (Bool) -> () = { (finished) in
			for (key, view) in self.viewStore {
				if !(key == state) {


			completion?()
		}
        
		animateChanges(animated: animated, animations: animations, animationCompletion: animationCompletion)
	}
	
	private func hideAllViews(#animated: Bool, completion: (() -> ())? = nil) {
        let animations: () -> () = {
            for (_, view) in self.viewStore {
                view.alpha = 0.0
            }
        }
        
		let animationCompletion: (Bool) -> () = { (finished) in
			for (_, view) in self.viewStore {
				view.removeFromSuperview()
