                       #js {:contentEditable "true"
                            :ref "code-box"
                            :className "clojure"
-                           :onBlur (fn [ev]
-                                     (om/update! data :reduction (.-textContent (.-target ev)))
-                                     (update-box owner "code-box"))}
+                           :onBlur
+                           (fn [ev]
+                             (om/update! data :reduction
+                                         (.-textContent (.-target ev)))
+                             (update-box owner "code-box"))}
                       (:reduction data))))
         (dom/div
           nil
           (dom/button
-            #js {:onClick (fn [_]
-                            (go
-                              (let [res
-                                    (:body
-                                      (<! (client/post
-                                            "/projections"
-                                            {:json-params
-                                             {:projection-name (:projection-name data)
-                                              :stream-name (:stream-name data)
-                                              :initial-value (:initial-value data)
-                                              :language (:language data)
-                                              :reduction (:reduction data)}})))]
-                                (update-projections! data))))}
-            "Register projection"))))))
+              #js {:onClick
+                   (fn [_]
+                     (go
+                       (let [res
+                             (:body
+                              (<! (client/post
+                                   "/projections"
+                                   {:json-params
+                                    (select-keys data
+                                                 [:projection-name
+                                                  :stream-name
+                                                  :initial-value
+                                                  :reduction
+                                                  :language])})))]
+                         (update-projections! data))))}
+              "Register projection"))))))
 
 (defn widget-projections [data owner]
   (reify

      {:events []})
    om/IDidMount
    (did-mount [this]
      (go (let [response (:body (<! (client/get (str "/stream/" (:stream data)))))]
            (om/update-state! owner #(assoc % :events (:results response))))))
    om/IDidUpdate
    (did-update [_ _ _]
      (dorun (map #(.highlightBlock js/hljs %) ($ "code"))))

                          :new-projection false}))

(defn clj->str [c]
  (let [res (clojure.string/replace
             (with-out-str (fipp/pprint c {:width 80})) #"}nil" "}")]
    (.log js/console res)
    res))

