             newSplitView.adjustSubviews()
             
             let newPaneViews = newSplitView.paneSubviews()
-            var paneViewSide = (self.isVertical == true) ? newSplitView.frame.width : newSplitView.frame.height
+            var paneViewSide = (self.isVertical) ? newSplitView.frame.width : newSplitView.frame.height
             paneViewSide = paneViewSide / CGFloat(newPaneViews.count) - newSplitView.dividerThickness*CGFloat(newPaneViews.count-1)
             
             for index in 0..<newPaneViews.count-1 {

            // First unselect any pane
            self.makeKey(nil)
            
            //
            let dividerIndex = max(0, paneViewIndex - 1)

            // Prepare newSplitView and add the newPaneView to it
            newSplitView.isVertical = vertically
            newSplitView.addSubview(newPaneView)
            
            // Get side size before playing with pane views.
            let paneViewSide = (vertically) ? paneView.frame.width : paneView.frame.height

            // Add the newSplitView after the triggering paneView
            self.insertArrangedSubview(newSplitView, at: paneViewIndex + 1)
            self.adjustSubviews()

            // Remove that paneView
            paneView.removeFromSuperview()

        }
        
        let paneViewIndex = self.indexOfPaneView(paneView)!
//        let dividerPosition = self.dividerPosition(forPaneView: paneView)

        let newPaneView = self.factory.newPaneView()
        var newSplitView: PanesSplitView!
