        [:div
         [:header {:className "default-primary-color" } "sledge"]
         (om/build search-view (:search state))
-        (if (:viewing-queue? state)
+        (if (:viewing-queue? (:player state))
           [:div {:className "queue queue-open tracks" }
            (om/build queue-view (:queue (:player state)))]
           [:div {:className "queue tracks" } " "])
-        (om/build transport-buttons-view state)
+        (om/build transport-buttons-view (:player state))
         (om/build audio-el (:audio-el (:player state)))
         ]))))
 

                                       tracks)))}
                    "+")
            track-components
            (om/build-all results-track-view tracks)]
        (apply dom/div #js {:className "results tracks" }
               (dom/div #js {:className "track"}
                        (dom/span #js {:id "queue-all-tracks"}

(defn player-el []
  (aget (.getElementsByTagName js/document "audio") 0))

(defn transport-buttons-view [wanted owner]
  (reify
    om/IRender
    (render [this]
      (let [queue (:queue wanted)
            actual (player-el)
            want-play (:playing (:audio-el wanted))
            actually-playing (and actual (not (.-paused actual)))
