     (render-state [this {:keys [deadline-chan]}]
       (form-display deadline-chan owner))))
 
-(def app-history (atom [@app-state]))
-
-(add-watch app-state :history
-  (fn [_ _ _ n]
-    (when-not (= (last @app-history) n)
-      (swap! app-history conj n))))
-
-(defn undo
-  [event]
-  (when (> (count @app-history) 1)
-    (swap! app-history pop)
-    (reset! app-state (last @app-history))))
-        
 
 ;;Root component, composed of timer and form
 (defn countdown-timer 

(enable-console-print!)

;;Defining app state
(def app-state (atom {:deadline nil }))

;;Date related helpers
(defn date-gen 

      ;;Update remaining time in the app state every one second.
      (om/set-state! owner :interval
        (js/setInterval
            #(om/set-state! owner :remaining (remaining (:deadline @app) (:drunk @app)))
          1000))) 

    om/IWillUnmount
