 
 (def new-keys!
     (let [keys (atom nil)]
-        (fn [key-update]
-            (swap! keys #(merge key-update))
-            @keys)))
+        (fn ([] @keys)
+            ([key-update]
+                (swap! keys #(merge key-update))
+                @keys))))
 
 (defn register-keys [^Provider provider keys]
     (let [return (chan)]


(def new-provider!
    (let [provider (atom nil)]
        (fn [ ]
            (when @provider
                (doto @provider
                    (.reset)

                            (put! return action)))))
        return))

(defn keypress-channel! [key-change]
    (let [old-keys (new-keys!)]
        (try
            (let [keys (new-keys! key-change)
                  provider (new-provider!)
                  channel (register-keys provider keys)]
                (save-keys! keys)
