     listeners.append(closeEvent.on(block))
   }
 
-  // func onDidClickOpenInTerminal(block: @escaping Block<Void>) {
-  //   listeners.append(openInTerminalClickEvent.on(block))
-  // }
-
   func item(didClick: ItemBase) {
      delegate?.bar(didClickOpenInTerminal: self)
   }
 
   private func separator() {
-    item.menu?.addItem(NSMenuItem.separator())
+    menu.addItem(NSMenuItem.separator())
   }
 
   private func setPrefs() {
+    // TODO: These should be static
     separator()
     updatedAgoItem = UpdatedAgoItem()
-    item.menu?.addItem(updatedAgoItem!)
-    item.menu?.addItem(ItemBase("Run in Terminal…", key: "o", delegate: self))
-    item.menu?.addItem(PrefItem())
+    menu.addItem(updatedAgoItem!)
+    menu.addItem(ItemBase("Run in Terminal…", key: "o", delegate: self))
+    menu.addItem(PrefItem())
   }
 
   // Private, not to be called

    instead of using isVisible = false or hide()
*/
class Tray: NSObject, NSMenuDelegate, ItemBaseDelegate {
  private var listeners = [Listener]()
  private let openEvent = Event<Void>()
  private let closeEvent = Event<Void>()
  private let openInTerminalClickEvent = Event<Void>()
  private var isOpen = false
  private var updatedAgoItem: UpdatedAgoItem?
  private let menu = NSMenu()
  private var defaultCount = 0
  private let item: NSStatusItem = NSStatusBar.system()
    .statusItem(withLength: NSVariableStatusItemLength)
  internal weak var delegate: TrayDelegate?

  /**

import AppKit
import EmitterKit
import Cocoa

/**
  Represents an item in the menu bar
