                     toolbarDefaultItemIdentifiers?.append(NSToolbarFlexibleSpaceItemIdentifier)
                 }
                 
-                let offset = toolbarDefaultItemIdentifiers!.count
-                
                 for viewController in viewControllers {
-                    
                     toolbarDefaultItemIdentifiers?.append(viewController.preferencesIdentifier())
-                    
                 }
                 
                 if centerToolbarItems {

        
        super.init(coder: coder)
        
    }
    
    ////////////////////////////////////////////////////////////////////////////////

        
        if let preferencesViewController = viewController as? NSViewController {
            
            var viewControllerFrame = preferencesViewController.view.frame
            let headerViewHeight = headerView.frame.size.height
            viewControllerFrame.size.height += headerViewHeight
            
            if  let currentWindowFrame = window?.frame,
                let frameRectForContentRect = window?.frameRectForContentRect(viewControllerFrame) {
