               (apply dom/div nil
                      (str (second item)))))))
 
+;; TODO: with links
 (defn item-view [app owner]
   (reify
     om/IRender
     (render [this]
-      (let [current-item  (:current-item @app-state)]
+      (let [current-item  (:current-item @app-state)
+            item (second (get (:items @app-state) (int current-item)))]
         (dom/div #js {:style (hidden (-> app :hidden :item))}
                  (dom/h1 nil "Current item")
-                 (dom/p nil (str (second (get (:items @app-state)
-                                              (int current-item))))))))))
+                 (apply dom/div nil
+                        (prepare-item item)))))))
 
 (defn event-loop [app event-chan]
   (go


(defn split-words [s] (split s #"\s+"))

;; Let's just start with all the words. Leaving freqs in.
(defn make-word-map [[id str]]
  (zipmap (map first
               (frequencies (split-words str)))
          (repeat [id])))

(defn add-item [app owner]
  (let [new-item-text (-> (om/get-node owner "new-item")

  (let [value (.. e -target -value)]
    (om/set-state! owner :text text)))

;; TODO: Implement proper tf-idf with 1-gram and basic-english-list
#_(defn naive-key-extractor [str]
    (vec (map first
