   (let [ename (partial actor-or-movie-name db)
         annotate-node (fn [node]
                         (let [ent (d/entity db node)]
-                          {:type (if (:person/name ent) "actor" "movie")
+                          {:type (if (:cnet/cnet ent) "actor" "movie")
                            :year (:movie/year ent)
                            :name (ename ent)
                            :entity ent}))]


(defn actor-or-movie-name [db eid]
  (let [ent (d/entity db (e eid))]
    (or (:movie/title ent) (:person/name ent))))

(defn referring-to
  "Find all entities referring to an eid as a certain attribute."

  name is the actor's name"
  [db eid]
  (-> (d/entity db (e eid))
      :cnet/start))

(defn actor-search
  "Returns set with exact match, if found. Otherwise query will
