       (println "initial param was:" par)))
   (if (not (:data db nil))
     (do (println "Calling major Tom")
-        (data_from_db "/data.json"))))
+        (data_from_db DB))))
 
 (defn viewer [c]
   (m "div" nil
      [(m "h1" {:style {:color "green"}} (:var db))
+      (m "div" nil [(m "button" {:onclick #(data_to_db DB)} "Send!")])
       (editor (:editing db))
       (m "div" {} [(m "ol" nil (notes (:data db) (:start db)))])
       (pages)]))

            pos (+ start i)]
          (m "li" nil [(m "button" {:onclick #(edit item pos)} "Edit")
                       title])))
    (subvec data start (+ start PAGESIZE))))

(defn page [start direction count]
  (let [next (direction start PAGESIZE)

  "Data request error handler"
  (.log js/console (str "something went wrong: " status " " status-text)))

(defn fetch [url]
  "Get data from URL"
  (GET url {:handler handler
