   :pick-random-reference
   (fn [app-state [_]]
     (let [tropes  (get-in app-state [:article-data :tropes])
-          pick    (rand-nth tropes)
+          pick    (rand-nth (not-empty tropes))
           element (if (nil? pick) {} pick)]
       (assoc-in app-state [:article-data :current-reference] element))))
 

         [:p (process-trope @current-ref [true])]
         [:div [:span (str "(" @remaining " remaining)")]]
         [:div
          [button-item "Interesting" "btn-success" [:vote :like]]
          [button-item "Skip" "btn-info" [:vote :skip]]]])
      (if (some? @like-list)
        [:div {:id "trope-list-container"}
         [:p "Selected items: "]
         [:ul
          (for [trope @like-list]
            ^{:key (hash trope)} [:li (process-trope (:ref trope) [false])
                                  " (" [:a {:on-click #(re-frame/dispatch [:load-article (:code trope) false])} (:display trope)] ")"  ])]
         ])
      ]])
  )

                                   :id    id}]))


(defn button-item [label class dispatch-vals is-disabled?]
  [:button {:type "button" :class (str "btn " class) :disabled is-disabled? :on-click #(re-frame/dispatch dispatch-vals)} label])

(defn nav-item [selected item-key label]
  [:li {:class (when (= selected item-key) "active")}
