        {:handler  (fn [x]
                     (println "Fetching programmes.")
                     (om/update! data [:programmes :data] (mapv slugify-programme x))
-                    (om/update! data [:programmes :fetching] (if (empty? x) :no-data :has-data))
-                    (om/update! data [:programmes :selected] nil))
+                    (om/update! data [:programmes :fetching] (if (empty? x) :no-data :has-data)))
         :error-handler (fn [{:keys [status status-text]}]
                          (om/update! data [:programmes :fetching] :error)
                          (om/update! data [:programmes :error-status] status)

      (println "New Active Components: " (-> nav-event :args :ids))

      ;; Clear down
      (when (and old-programmes
                 (nil? programmes))
        (println "Clearing projects.")
        (om/update! data [:projects :data] [])
        (om/update! data [:projects :programme_id] nil))

      (when (and old-projects
                 (nil? projects))
        (println "Clearing properties.")
        (om/update! data [:properties :data] [])
        (om/update! data [:properties :project_id] nil))

      (when (and old-properties
                 (nil? properties))
        (println "Clearing devices, sensors and measurements.")
        (om/update! data [:property-details :data] {})
        (om/update! data [:property-details :property_id] nil)

        :response-format :text}))

(defn fetch-projects [programme-id data]
  (om/update! data [:projects :fetching] :fetching)
  (GET (str "/4/programmes/" programme-id "/projects/")
       {:handler  (fn [x]
                    (println "Fetching projects for programme: " programme-id)
                    (om/update! data [:projects :data] (mapv slugify-project x))
                    (om/update! data [:projects :fetching] (if (empty? x) :no-data :has-data)))
        :error-handler (fn [{:keys [status status-text]}]
                         (om/update! data [:projects :fetching] :error)
                         (om/update! data [:projects :error-status] status)
