                 displayValue = result
                 setHistoryDisplay()
             } else {
-                displayValue = 0.0
+                displayValue = nil
                 history.text = "ERROR"
             }
         }
     }
     
     @IBAction func enter() {
+        if nil == displayValue { return }
+        
         userIsInTheMiddleOfTypingANumber = false
-        if let result = brain.pushOperand(displayValue){
+        if let result = brain.pushOperand(displayValue!){
             displayValue = result
             setHistoryDisplay()
         } else {
-            displayValue = 0.0
+            displayValue = nil
             history.text = "ERROR"
         }
     }

    @IBAction func clear(sender: UIButton) {
        brain.clear()
        userIsInTheMiddleOfTypingANumber = false
        displayValue = 0.0
        history.text = ""
    }
    
    func setHistoryDisplay() {

        history.text = newText.joinWithSeparator(" ")
    }
    
    var displayValue: Double? {
        get {
            // Do this condition in the brain?
            if "π" == display.text {
                return M_PI
            }
            
            if let interpretedNumber = NSNumberFormatter().numberFromString(display.text!) {
                return interpretedNumber.doubleValue
            }
            return nil
        }
        set {
            if (nil != newValue) {
                display.text = "\(newValue!)"
            } else {
                display.text = " "
            }
            userIsInTheMiddleOfTypingANumber = false
        }
    }
