     
     var currentStatus: Status? {
         didSet {
-            if let status = currentStatus {
-                statusTextField.stringValue = status.rawValue
-                switch status {
-                case .Success:
-                    statusTextField.textColor = NSColor(calibratedRed: 0, green: 149/255.0, blue: 0, alpha: 1)
-                case .Failure:
-                    statusTextField.textColor = NSColor.orangeColor()
-                case .Error:
-                    statusTextField.textColor = NSColor.redColor()
-                default:
-                    statusTextField.textColor = NSColor.blackColor()
-                }
+            guard let status = currentStatus else {
+                return
+            }
+
+            statusTextField.stringValue = status.rawValue
+            switch status {
+            case .Success:
+                statusTextField.textColor = NSColor(calibratedRed: 0, green: 149/255.0, blue: 0, alpha: 1)
+            case .Failure:
+                statusTextField.textColor = NSColor.orangeColor()
+            case .Error:
+                statusTextField.textColor = NSColor.redColor()
+            default:
+                statusTextField.textColor = NSColor.blackColor()
             }
         }
     }

    }
    
    @IBAction func saveHostButtonPressed(sender: NSButton) {
        if let helper = pingHelper {
            statusTextField.stringValue = "Starting…"
            statusTextField.textColor = NSColor.blackColor()
            helper.host = targetHostTextField.stringValue
            helper.start()
            savePrefs(fromPingHelper: helper)
        }
    }
    
    @IBAction func startStopButtonPressed(sender: NSButtonCell) {
        if let helper = pingHelper {
            if helper.running {
                helper.stop()
            } else {
                helper.start()
            }
        }
    }
    

    var pingHelper: PingHelper?
    
    @IBAction func intervalTextFieldChanged(sender: NSTextField) {
        guard let helper = pingHelper else {
            return
        }
        helper.interval = intervalTextField.doubleValue
        helper.start()
        savePrefs(fromPingHelper: helper)
    }
    
    @IBAction func quit(sender: AnyObject) {
