       (println "New Programmes: " programmes " New Projects: " projects " New Properties: " properties)
       (println "New Active Components: " (-> nav-event :args :ids))
 
-      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       ;; Clear down
       (when (and old-programmes
                  (nil? programmes))

        (om/update! data [:sensors :data] [])
        (om/update! data [:measurements :data] []))

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;; Fetchers
      (when-not programmes
        (om/update! data [:programmes :selected] nil)

        (om/update! data [:projects :selected] projects)
        (fetch-properties projects data))

      ;; property handling is special as it gets a tree of data
      (when (and properties
                 (not= properties old-properties))
        (om/update! data [:properties :selected] properties)
        (om/update! data [:property-details :property_id] properties)
        (let [property-details (->> @data
                                    :properties
                                    :data
                                    (filter #(= (:id %) properties))
                                    first)]
          (om/update! data [:property-details :data] property-details)
          (om/update! data [:sensors :data] (extract-sensors (get property-details :devices [])))))
      
      ;; Update the new active components
      (om/update! data :active-components (-> nav-event :args :ids)))
