           [:div.pure-u
            [categories-ac-comp {:id      (str "ctags" i)
                                 :class   "edit" :placeholder "type to find and add category.."
-                                :on-save #(when (some #{%} (session/get :all-categories))
-                                           (swap! template-state update-in [:parts i :categores] conj %))}]])]
-       (when @show-categories-list
-         (for [c (session/get :all-categories)]
+                                :on-save #(when (and (some #{%} (session/get :all-categories))
+                                                     (not (some #{%} (get-in @template-state [:parts i :categories]))))
+                                           (swap! template-state update-in [:parts i :categories] conj %))}]])
+        [:button.pure-u {:on-click #(handler-fn (reset! showing-categories-list (not @showing-categories-list)))}
+         (if @showing-categories-list "Hide list of categories" "Show list of categories")]]
+
+       (when @showing-categories-list
+         (for [c (sort (session/get :all-categories))]
            ^{:key c} [:div.pure-g
-                      [:div.pure-u (str c)]]))
-
-       [:div.pure-g (for [c (get-in @template-state [:parts i :categories])]
-                      ^{:key c} [:div.pure-u {:style {:margin-right "5px"}} c])]
-
-       [:div.pure-g (for [c categories]
-                      ^{:key c} [:div.pure-u {:style {:margin-right "5px"}} c])]
+                      [:div.pure-u {:style    {:background (when (some #{c} (get-in @template-state [:parts i :categories]))
+                                                             "yellow")}
+                                    :on-click #(when (not (some #{c} (get-in @template-state [:parts i :categories])))
+                                                (swap! template-state update-in [:parts i :categories] conj c))} c]]))
 
 
 
 
-       [:div.pure-g
-        [:label.pure-u "It consists of "
-         [:span {:style {:color "red"}} n] " generated movements,"]
-        [:button.pure-u
-         {:on-click #(swap! template-state update-in [:parts i :n] inc)} "+"]
-        [:button.pure-u
-         {:on-click #(when (> n 0)
-                      (swap! template-state update-in [:parts i :n] dec))} "-"]]
+
+
 
 
        [:div.pure-g

        (adjust-parts-component)
        (let [parts (:parts @template-state)]
          (for [i (range 0 (count parts))]
            ^{:key i} [part-creator-component (get parts i) i]))]])))

(defn description-component []
  [:div.pure-g
  [:p.subtitle.pure-u
    [:input {:type        "text"
             :placeholder "A suitable description"
             :on-change   #(swap! template-state assoc :description (-> % .-target .-value))
