      :add-example {}
      :add-see-also {}
      :add-note {}
-     :user {:login "zk" :account-source "github"}}
+     :user nil}
     (util/page-data!)))
-
-(defn new-example-loop [!state ex-chan]
-  (go-loop []
-    (when-let [ex (<! ex-chan)]
-      (let [ex (-> ex
-                   (dissoc :_id)
-                   (assoc :var (select-keys (:var @!state) [:ns :name :library-url])))]
-        (swap! !state update-in [:add-example]
-          (fn [m]
-            (-> m
-                (dissoc :error)
-                (assoc :loading? true))))
-        (if-let [error (when (empty? (:body ex)) "Please provide an example body")]
-          (swap! !state update-in [:add-example] assoc :error error)
-          (let [{:keys [success error data]} (<! (req-create-example ex))]
-            (if success
-              (swap! !state
-                (fn [m]
-                  (-> m
-                      (assoc :add-example {:body ""})
-                      (assoc :examples (vec (concat (:examples m) [data]))))))
-              (swap! !state update-in [:add-example] assoc :error error)))))
-      (swap! !state update-in [:add-example] dissoc :loading?)
-      (recur))))
 
 (defn update-example [{:keys [examples] :as state} _id f & args]
   (assoc state

         :error (fn [res]
                  (put! c {:success false :res res}))}))
    c))

#_(defn $nav [{:keys [examples see-alsos notes]} owner]
    (reify
      om/IRender
      (render [_]
        (html
          [:div
           [:h5 "Nav"]
           [:ul
            [:li [:a {:href "#"
                      :data-animate-scroll "true"
                      :data-animate-buffer "20"}
                  "Top"]]
            [:li [:a {:href "#examples"
                      :data-animate-scroll "true"
                      :data-animate-buffer "20"}
                  "Examples "
                  [:span.badge (count examples)]]]
            [:li [:a {:href "#see-also"
                      :data-animate-scroll "true"
                      :data-animate-buffer "10"}
                  "See Also "
                  [:span.badge (count see-alsos)]]]
            (when (> (count notes) 0)
              [:li [:a {:href "#notes"
                        :data-animate-scroll "true"
                        :data-animate-buffer "10"}
                    "Notes"
                    [:span.badge (count notes)]]])]]))))

(defn $nav [!state owner]
  (let [{:keys [examples see-alsos notes]} @!state]


(enable-console-print!)

(defn ajax-chan [opts]
  (let [c (chan)]
    (ajax
