   }
 
   private func showErrorIcons() {
-    guard let button = item.button else {
-      return log.error("Could not find button on status item (show)")
-    }
-
     let fontSize = Int(FontType.bar.size)
     let size = CGSize(width: fontSize, height: fontSize)
     let icon = OcticonsID.bug
 
-    button.image = NSImage(
+    image = NSImage(
       octiconsID: icon,
       iconColor: App.inactiveColor,
       size: size
     )
 
-    button.alternateImage = NSImage(
+    alternateImage = NSImage(
       octiconsID: icon,
       backgroundColor: .white,
       iconColor: .white,

import SwiftyBeaver

class Tray: Parent {
  internal let log = SwiftyBeaver.self
  internal weak var root: Parent?
  private static let center = NSStatusBar.system()
  private static let length = NSVariableStatusItemLength
  private var item: MenuBar
  internal var menu: NSMenu? {
    set { item.menu = newValue }
    get { return item.menu }
  }

  static internal var item: MenuBar {
    return Tray.center.statusItem(withLength: length)
  }

  var attributedTitle: NSAttributedString? {
    get { return item.attributedTitle }
    set { item.attributedTitle = newValue }
  }

  /**
    @title A title to be displayed in the menu bar
    @isVisible Makes it possible to hide item on start up
  */
  init(title: String, isVisible displayed: Bool = false, id: String? = nil, parent: Parent? = nil) {
    if App.isInTestMode() {
      self.item = TestBar()

  }

  private func hideErrorIcons() {
    image = nil
    alternateImage = nil
  }

  private var image: NSImage? {
    set { Async.main { self.button?.image = newValue } }
    get { return button?.image }
  }

  private var alternateImage: NSImage? {
    set { Async.main { self.button?.alternateImage = newValue } }
    get { return button?.alternateImage }
  }

  private var button: NSButton? {
    if let button = item.button {
      return button
    }

    log.error("Could not find button on status item (hide)")
    return nil
  }

  private func style(_ immutable: Immutable) -> Immutable {
