 
 (defn- start-request! [item]
   (if-let [id (:id item)]
-    (if (not (some item '(:sith-lord :request)))
+    (if (not (some item '(:data :request)))
       (let [url (str "http://localhost:3000/dark-jedis/" id)
             request (ajax/GET url :response-format :json :handler handle-sith-lord-response!)]
         (assoc item :request request))

(defonce ^:private items (r/atom (vec (repeat 5 nil)) :validator vector?))

(defn- homeworld-matches? [items current-planet]
  (let [sith-lords-homeworlds (map #(get-in % [:sith-lord "homeworld"]) items)]
     (not (empty? (filter #(= % current-planet) sith-lords-homeworlds)))))

(defn frozen? []


(defn- scroll-once! [items direction]
  (case direction
    :up (let [first-sith-lord (-> items first :data)
              master-id (get-in first-sith-lord ["master" "id"])
              master-item {:id master-id}]
          (abort-request! (peek items))
          (into [master-item] (pop items)))
    :down (let [last-sith-lord (-> items last :data)
                apprentice-id (get-in last-sith-lord ["apprentice" "id"])
                apprentice-item {:id apprentice-id}]
            (abort-request! (nth items 0))
