 (defn main [todos opts]
   (dom/component
     (dom/section #js {:id "main"}
-      (dom/input #js {:id "toggle-all"
-                      :type "checkbox"
+      (dom/input #js {:id "toggle-all" :type "checkbox"
                       :onChange #(toggle-all % todos)})
       (dom/ul #js {:id "todo-list"}
         (into-array
           (map #(om/render item/todo-item todos
-                  {:path [%]
-                   :opts opts
-                   :key :id
+                  {:path [%] :opts opts :key :id
                    :fn (fn [todo]
                          (if (= (:id todo) (:editing opts))
                            (assoc todo :editing true)

          (str " " (pluralize active "item") " left"))
        (dom/ul #js {:id "filters"}
          (dom/li nil
            (dom/a #js {:href "#/" :className (selected :all)}
              "All"))
          (dom/li nil
            (dom/a #js {:href "#/active" :className (selected :active)}
              "Active"))
          (dom/li nil
            (dom/a #js {:href "#/completed" :className (selected :completed)}
              "Completed")))
        clear-button))))

;; =============================================================================

            (range (count todos))))))))

(defn footer [{:keys [todos] :as app} opts]
  (let [{:keys [active completed showing comm]} opts
        clear-button (when (pos? completed)
                       (dom/button
                         #js {:id "clear-completed"
                              :onClick #(put! comm [:clear (now)])}
                         (str "Clear completed " completed)))
        sel (-> (zipmap [:all :active :completed] (repeat ""))
                (assoc showing "selected"))]
    (dom/component
      (dom/footer #js {:id "footer"}
        (dom/span #js {:id "todo-count"}
