         view.addSubview(consoleViewController.view)
         consoleViewController.didMove(toParentViewController: self)
         
-        if let content = rootViewController {
-            addChildViewController(content)
-            content.view.frame = CGRect(x: consoleFrame.minX, y: consoleFrame.maxY, width: view.bounds.width, height: 120)
-            view.addSubview(content.view)
-            content.didMove(toParentViewController: self)
-        }
+        addChildViewController(rootViewController)
+        rootViewController.view.frame = CGRect(x: consoleFrame.minX, y: consoleFrame.maxY, width: view.bounds.width, height: 120)
+        view.addSubview(rootViewController.view)
+        rootViewController.didMove(toParentViewController: self)
         
         setupConstraints()
-    }
-    
-    func setupConstraints() {
-        
-        guard let rootViewControllerView = rootViewController?.view else {
-            print("You forgot to setup the rootViewController for TinyConsole")
-            return
-        }
-        
-        rootViewControllerView.attach(anchor: .top, to: view)
-        
-        consoleViewController.view.attach(anchor: .bottom, to: view)
-        consoleViewHeightConstraint?.isActive = true
-        
-        if #available(iOS 9, *) {
-            
-            rootViewController?.view.bottomAnchor.constraint(equalTo: consoleViewController.view.topAnchor).isActive = true
-        } else {
-            
-            NSLayoutConstraint(item: (rootViewController?.view)!, attribute: .bottom, relatedBy: .equal, toItem: consoleViewController.view, attribute: .top, multiplier: 1.0, constant: 0).isActive = true
-        }
     }
     
     open override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {

            UIView.animate(withDuration: 0.25) {
                self.view.layoutIfNeeded()
            }
        }
    }
}


import UIKit

open class TinyConsoleController: UIViewController {
    
    /// the kind of window modes that are supported by TinyConsole
    ///
    /// - collapsed: the console is hidden
    /// - expanded: the console is shown
    enum WindowMode {
        case collapsed
        case expanded
    }
    
    // MARK: - Private Properties -
    private var rootViewController: UIViewController
    
    private var consoleViewController: TinyConsoleViewController = {
        return TinyConsoleViewController()
    }()
    
    private lazy var consoleViewHeightConstraint: NSLayoutConstraint? = {
        if #available(iOS 9, *) {
            return self.consoleViewController.view.heightAnchor.constraint(equalToConstant: 0)
        } else {
