         ;; TODO sort out duplication here, wrap (on/build table ...) calls probably.
         ;;
         (let [{:keys [programmes projects properties devices sensors sensor-select]} tables]
-          (println ">>>> Sensors: " sensors)
           ;; (println "Tables: " tables)
           (html [:div
                  ;;(om/build clear-tables data)
-                 [:h1 {:id "programmes"} (:title data)]
-                 (om/build programmes-table programmes)
-
-                 [:h2 {:id "projects"} "Projects"]
-                 [:ul {:class "breadcrumb"}
-                  [:li (title-for programmes)]]
-                 (om/build table projects {:opts {:histkey :projects}})
+                 ;; [:div {:id "programmes"}
+                 ;;  [:h1 (:title data)]
+                 ;;  (om/build programmes-table programmes)]
+                 (om/build programmes-div programmes)
+
+                 ;; [:div {:id "projects"}
+                 ;;  [:h2 "Projects"]
+                 ;;  [:ul {:class "breadcrumb"}
+                 ;;   [:li (title-for programmes)]]
+                 ;;  (om/build table projects {:opts {:histkey :projects}})]
+                 (om/build projects-div tables)
 
                  [:h2  {:id "properties"} "Properties"]
                  [:ul {:class "breadcrumb"}

                     :id (str table-id "-selected")}
                [:td id [:a {:id (str "row-" id)}]] [:td lead-organisations] [:td name] [:td created-at]]))]])))))

(defn programmes-tab [data owner]
  (let [{tables :tables} data]
    (reify

  (let [[type _] (str/split selected #"-")]
    type))

(defn programmes-div [programmes owner]
  (reify
    om/IRender
    (render [_]
      (html
       ;; hide div if we've already chosen something
       [:div {:id "programmes" :class (if (:active programmes) "hidden" "")}
        [:h1 "Programmes"]
        (om/build programmes-table programmes)]))))

(defn programmes-table [cursor owner]
  (reify
    om/IRender
