   (fn
     [todos _]
     (->> (vals todos)
-         (remove :done)
+         (filter :done)
          (map :id)
          (reduce dissoc todos))))
 
 ;; -- Subscriptions ---------
 
-
 (register-sub
   :initialised?
   (fn

                      :on-blur save
                      :on-change #(reset! val (-> % .-target .-value))
                      :on-key-down #(case (.-which %)
                                      13 (save)
                                      27 (stop)
                                      nil)})])))

(def todo-edit (with-meta todo-input
                 {:component-did-mount #(.focus (reagent/dom-node %))}))

(defn stats-footer
  []

        stop #(do (reset! val "")
                  (if on-stop (on-stop)))
        save #(let [v (-> @val str clojure.string/trim)]
               (if-not (empty? v) (on-save v))
               (stop))]
    (fn [props]
      [:input (merge props
                     {:type "text"
