             [discuss.utils.common :as lib]
             [discuss.utils.views :as vlib]))
 
-;(def data (atom {}))
-(def counter (atom 0))
-
-(defn prepare-search-results
+(defn get-search-results
   "Extract values and create a list of maps."
   []
-  (let [vals (get-in @lib/app-state [:discussion :search :values])
-        vals-dict (for [[k v] vals] {k v})]
-    (vec vals-dict)))
+  (get-in @lib/app-state [:discussion :search :values]))
 
 (defn statement-handler
   "Called when received a response in the search."

      (lib/error-msg! error)
      (do
        (lib/no-error!)
        (lib/update-state-item! :discussion :search (fn [_] res))
        #_(let [foo (prepare-search-results)]
          (println foo)
          (println (count foo)))))))

(defn statement
  "Find related statements to given keywords."

(defn item-view [data owner]
  (reify om/IRender
    (render [_]
      (dom/div #js {:className "bs-callout bs-callout-info"}
               (vlib/safe-html (:text data))
               (dom/span #js {:className "badge pull-right"}
                         (lib/str->int (:distance data)))))))

(defn form-view []
  (reify om/IRender
