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

            DispatchQueue.main.sync {
                switch state {
                case .none:
                    self.hideAllViews(animated: animated, completion: c)
                case .view(let viewKey):
                    self.showView(forKey: viewKey, animated: animated, completion: c)
                }
            }
        }

    // MARK: Private view updates
    
	fileprivate func showView(forKey state: String, animated: Bool, completion: (() -> ())? = nil) {
        let store = viewStore

		if let newView = store[state] {
			newView.alpha = animated ? 0.0 : 1.0

            let insets = (newView as? StatefulPlaceholderView)?.placeholderViewInsets() ?? UIEdgeInsets()
            let width = view.frame.width - insets.left - insets.right
            let height = view.frame.height - insets.top - insets.bottom
			newView.frame = CGRect(x: insets.left, y: insets.top, width: width, height: height)

			view.addSubview(newView)
		}

		let animations: () -> () = {
			if let newView = store[state] {
				newView.alpha = 1.0
			}
		}

		let animationCompletion: (Bool) -> () = { (finished) in
			for (key, view) in store {
				if !(key == state) {
					view.removeFromSuperview()
				}
