                     :document true
                     :open-paths {}
                     :cache {}
-                    :notebooks {}})
+                    :index {}
+                    :notebooks []})
 
 (defn path->step [path]
   (let [{:keys [notebook page step]} (last path)]


(defn remove-input! [id]
  (swap! aurora-state update-in [:cache :inputs] dissoc id))

(defn add-notebook! [desc]
  (let [notebook {:type :notebook
                  :id (compiler/new-id)
                  :desc desc
                  :pages {}}]
    (when (ast/notebook! notebook)
      (swap! aurora-state update-in [:notebooks] assoc (:id notebook) notebook)
      (add-input! (:id notebook) :desc)
      notebook)))

(defn add-page! [notebook-id desc]
  (let [page {:type :page
              :id (compiler/new-id)
              :tags #{:page}
              :args []
              :desc desc
              :steps {}}]
    (when (ast/page! page)
      (swap! aurora-state update-in [:notebooks notebook-id :pages] assoc (:id page) page)
      page)))

(defn add-step! [notebook-id page-id info])

                       :onKeyPress (fn [e]
                                     (when (= 13 (.-charCode e))
                                       (remove-input! (:id page))
                                       (update-index! page [] assoc :desc (.-target.value e))
                                       ))}]]
             [:li {:className "page"
                   :onContextMenu (fn [e]
                                    (add-input! (:id page) :desc)
                                    (.stopPropagation e)
                                    (.preventDefault e))
                   :onClick click
                   :onTouchStart click}
