           [:h2  "Devices"]
           [:ul {:class "breadcrumb"}
            [:li [:a
-                 {:onClick (fn [_ _]
-                             (history/update-token-ids! history :properties nil)
-                             (history/update-token-ids! history :projects nil)
-                             (history/update-token-ids! history :programmes nil)
-                             (fixed-scroll-to-element "programmes-div"))}
+                 {:onClick (back-to-programmes history)}
                  (title-for programmes)]]
            [:li [:a
-                 {:onClick (fn [_ _]
-                             (history/update-token-ids! history :properties nil)
-                             (history/update-token-ids! history :projects nil)
-                             (fixed-scroll-to-element "projects-div"))}
+                 {:onClick (back-to-projects history)}
                  (title-for projects)]]
            [:li [:a
-                 {:onClick (fn [_ _]
-                             (history/update-token-ids! history :properties nil)
-                             (fixed-scroll-to-element "properties-div"))}
-                 (title-for properties :title-key :addressStreetTwo)]]]
+                 {:onClick (back-to-properties history)}
+                 (title-for properties :title-key :address-street-two)]]]
           (om/build devices-table devices {:opts {:histkey :devices}})])))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

          ;; (ajax (tap-history) tables [:properties] {:template      "/4/projects/:projects/properties/"
          ;;                                           :content-type "application/json"
          ;;                                           :selection-key :properties})
          (ajax (tap-history) tables [:devices] {:template      "/4/entities/:properties/devices/"
                                                 :content-type  "application/json"
                                                 :selection-key :devices})
          (ajax (tap-history) tables [:sensors] {:template "/4/entities/:properties/devices/:devices"
                                                 :content-type "application/json"
                                                 :selection-key :sensors} (:chart data))

          [:h2 "Projects"]
          [:ul {:class "breadcrumb"}
           [:li [:a
                 {:onClick (back-to-programmes history)}
                 (title-for programmes)]]]
          (om/build projects-table projects {:opts {:histkey :projects}})])))))

