   "Finds all hashtags used in entries by finding the edges that originate from the
   :hashtags node."
   [current-state]
-  (let [g (:graph current-state)]
-    (set (map #(-> % :dest :tag) (uber/find-edges g {:src :hashtags})))))
+  (let [g (:graph current-state)
+        ltags (map #(-> % :dest :tag) (uber/find-edges g {:src :hashtags}))
+        tags (map #(:val (uber/attrs g {:tag %})) ltags)]
+    (set tags)))
 
 (defn find-all-mentions
   "Finds all hashtags used in entries by finding the edges that originate from the
   :hashtags node."
   [current-state]
-  (let [g (:graph current-state)]
-    (set (map #(-> % :dest :mention) (uber/find-edges g {:src :mentions})))))
+  (let [g (:graph current-state)
+        lmentions (map #(-> % :dest :mention) (uber/find-edges g {:src :mentions}))
+        mentions (map #(:val (uber/attrs g {:mention %})) lmentions)]
+    (set mentions)))
 
 (defn get-basic-stats
   "Generate some very basic stats about the graph size for display in UI."

(defn get-tags-mentions-matches
  "Extract matching timestamps for query."
  [g query]
  (let [t-matched (map #(set (map :dest (uber/find-edges g {:src          {:tag %}
                                                            :relationship :CONTAINS})))
                       (:tags query))
        m-matched (map #(set (map :dest (uber/find-edges g {:src          {:mention %}
                                                            :relationship :CONTAINS})))
                       (:mentions query))]
    (apply set/intersection
           (concat t-matched m-matched))))


  [graph entry]
  (let [mentions (:mentions entry)]
    (reduce (fn [acc mention]
              (let [lmention (s/lower-case mention)]
                (-> acc
                    (uber/add-nodes :mentions)
                    (uber/add-nodes-with-attrs [{:mention lmention} {:val mention}])
                    (uber/add-edges
                      [{:mention lmention} (:timestamp entry) {:relationship :CONTAINS}]
                      [:mentions {:mention lmention} {:relationship :IS}]))))
            graph
            mentions)))

