                            "`"))))
   {:name        task-name
    :id          (build-id task-name)
-   :project     (select-keys project [:name :id])
+   :parent      (:id parent)
    :type        (if (= (:type parent) "Project")
                   "Task"
                   "SubTask")

(defn all-projects
  []
  (assoc
    (merge @active-projects @completed-projects)
    "Inbox"
    (inbox)))

(defn register-task
  [task-name {:keys [parent tags sub-tasks description remind-date due-date show-before repeating]

  (if (and (:repeating task)
           (= (get-in task [:repeating :type])
              "pattern"))
    (register-entity-in task repeating-tasks)
    (if (:done task)
      (register-entity-in task completed-tasks)
      (register-entity-in task active-tasks)))
  (register-entity-in task tasks)
  (register-tags! task :tasks))

(defn- store-project!
  [project]
  (if (= (:id project) "Inbox")
    (reset! inbox-project project)
    (do
      (register-entity-in project projects)
      (if (:done project)
        (register-entity-in project completed-projects)
        (register-entity-in project active-projects)))
    (register-tags! project :projects)))

(defn- get-parent
  [task]
  (if (= (:type task) "Task")
    (get (all-projects) (:parent task))
    (get (all-tasks) (:parent task))))

(defn- install-task
  [task]
