        "Maya"]]]]
    [:div {:class "section movements"}
     [:div.container
-     ;----
-
-     ;-----
-     (let [categories [vals @template]]
+     (let [categories (vals @template)]
        [:section
         (when (-> categories count pos?)
           [:div
            (for [c categories]
              ^{:key (:id c)} [category-item c])])])
-
-     #_(let [items (vals @movements)]
-       [:section#todoapp
-        [:header#header
-         [:h1 "Movements"]
-        (when (-> items count pos?)
-          [:div
-           [:section#main
-            [:ul#todo-list
-             (for [todo items]
-               ^{:key (:id todo)} [movement-item todo])]]])
-         [movement-input {:id          "new-todo"
-                          :placeholder "Add movement.."
-                          :on-save     add-movement!}]]])
      ]]
    [:div.footer
     [:div.container

(defn refresh-movement! [id] (update-movement! id (prep-name (first (take 1 (shuffle strength))))))

(defn mmap [m f a] (->> m (f a) (into (empty m))))
(defn complete-all [v] (swap! movements mmap map #(assoc-in % [1 :done] v)))
(defn clear-done [] (swap! movements mmap remove #(get-in % [1 :done])))

(defn movement-input [{:keys [title on-save on-stop]}]
  (let [val (atom title)

(defonce m-counter (atom 0))
(defonce c-counter (atom 0))

(defn add-movement! [text category-id]
  (let [category (get @template category-id)
        id (swap! (:m-counter category) inc)]
    (swap! (:movements category) assoc id {:id id :title text})))

(defn add-category! [title category]
  (let [id (swap! c-counter inc)]
    (swap! template assoc id {:id id :title title
                              :category category :m-counter (atom 0)
                              :movements (atom (sorted-map))})))

(defn add-mmovement! [text]
  (let [id (swap! m-counter inc)]
    (swap! movements assoc id {:id id :title text :done false})))

