     [:input {:type "button" :value "Upload" :on-click upload!}]]
    [:div.upload-status (@state :upload-status)]])
 
-(defn playlist-add-component [uuid]
+(defn playlist-add-component [track]
   [:input.add-button
    {:type "button" :value "+"
-    :on-click #(playlist-add uuid)}])
+    :on-click #(playlist-add (track "uuid"))}])
 
-(defn playlist-remove-component [uuid]
+(defn playlist-remove-component [track]
   [:input.add-button
    {:type "button" :value "-"
-    :on-click #(playlist-remove uuid)}])
+    :on-click #(playlist-remove (track "uuid"))}])
 
-(defn track-component [uuid]
+(defn track-component [track]
   [:span.track
-   ;(str " " (track "artist") " - " (track "title"))
-   (str uuid)])
+   (if track
+     (str " " (track "artist") " - " (track "title"))
+     "-")])
 
 (defn now-playing-component []
   [:div.now-playing

(defn library-component []
  [:div.library
   [:h2 "Library"]
   [:ul (for [uuid (@state :library)]
          [:li
           [playlist-add-component uuid]
           [track-component uuid]])]])

(defn page-component []
  [:div.page

  [:div.next
   [:span "Next:"]
   [:ul
    (for [track (get-in @state [:playlist "next"])]
      [:li
       [playlist-remove-component track]
       [track-component track]])]])

(defn playlist-component []
  [:div.playlist
   [:h2 "Playlist"]
   [now-playing-component]
   [next-component]])
