 public class AppViewController: UIViewController {
     
     /// Returns the view controller that is currently installed.
-    public var installedViewController: UIViewController? {
-        return self.currentRootViewController
-    }
+    public var installedViewController: UIViewController? { return self.currentRootViewController }
     
+    /// Internal reference to the installed view controller
     private var currentRootViewController: UIViewController?
     
     /**
      Transitions from the currently installed view controller to the specified view controller. If no view controller is installed, then this method simply loads the specified view controller.
-     
      - parameter toViewController: The view controller to transition to.
      - parameter animated: true if the transition should be animated, false otherwise.
      - parameter completion: A block to be executed after the transition completes.

    public override func viewWillLayoutSubviews() {
        self.currentRootViewController?.view.frame = self.view.bounds
    }
}

        }
        
        // add the new controller as a child
        addChildViewController(toViewController)
        toViewController.view.frame = view.bounds
        view.addSubview(toViewController.view)
        
        // if there is a current view controller, transition from it to the new one
        if let current = currentRootViewController {
            current.willMoveToParentViewController(nil)
            
            // update the current reference
            currentRootViewController = toViewController
            
            // perform the transition
            let d = animated ? 0.65 : 0.0;
            transitionFromViewController(current, toViewController: toViewController, duration: d, options: .TransitionCrossDissolve, animations: {
                // animate the status bar apperance change
                self.setNeedsStatusBarAppearanceUpdate()
            }) { finished in
                // "decontain" the old child view controller
                current.view.removeFromSuperview()
                current.removeFromParentViewController()
                
                // finish "containing" the new view controller
                toViewController.didMoveToParentViewController(self)
                
                // completion handler
