                            :filename filename))
         new-state (-> @state
                       (assoc-in [:projects filename] project)
-                      (update-in [:projects :order] conj filename))]
+                      (update-in [:projects :order] conj-if-absent filename))]
     (reset! state new-state)))
 
 (defn- on-project-load-update!


(defn- add-project!
  [filename]
  (when-not (contains? (:projects @state) filename)
    (add-project-as-loading! filename)
    (let [c (load-project-file filename)]
      (go
        (while-let [project (<! c)]
          (on-project-load-update! filename project))
        (finish-project-load! filename)))))

(defn- init-projects!
  [filenames]

;; Project Adding and Removing (from app state)
;;------------------------------------------------------------------------------

(defn- conj-if-absent
  [seq- elm]
  (if (some #(= elm %) seq-)
    seq-
    (conj seq- elm)))

(defn- add-project-as-loading!
  [filename]
  (let [project (-> initial-project-state
