 @available(OSX 10.12.2, *)
 extension ScriptsPopover: NSTouchBarDelegate {
     func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItemIdentifier) -> NSTouchBarItem? {
-        
+        //refactor this to use scrollable buttons instead of scrubber
         switch identifier {
         case NSTouchBarItemIdentifier.Scrubber:
             let scrubberItem = NSCustomTouchBarItem(identifier: identifier)

        return control.numberOfItems
    }
    
    func scrubber(_ scrubber: NSScrubber, viewForItemAt index: Int) -> NSScrubberItemView {
        print(scrubber)
        let itemView = scrubber.makeItem(withIdentifier: "ScrubberItem", owner: self) as! NSScrubberTextItemView
        itemView.title = control.itemTitles[index]
        return itemView
    }
    

}

@available(OSX 10.12.2, *)
class ScriptsPopover : NSTouchBar, NSScrubberDelegate,NSScrubberDataSource,NSScrubberFlowLayoutDelegate{
    //refactor this to use scrollable buttons instead of scrubber
    var presentingItem: NSPopoverTouchBarItem?
    var parentViewController:ViewController?
    var control:NSPopUpButton
