                      (:Target network)) networks)))
 
 (defn ->service-networks
-  [service networks]
-  (->> (get-in service [:Spec :TaskTemplate :Networks])
+  [service-spec networks]
+  (->> (get-in service-spec [:TaskTemplate :Networks])
        (map (fn [n] (->service-network n networks)))
-       (map (fn [n] {:networkName   (:Name n)
-                     :driver (:Driver n)}))
+       (map (fn [n] {:networkName (:Name n)
+                     :driver      (:Driver n)}))
        (into [])))
 
 (defn ->service-mounts
-  [service]
-  (->> (get-in service [:Spec :TaskTemplate :ContainerSpec :Mounts])
+  [service-spec]
+  (->> (get-in service-spec [:TaskTemplate :ContainerSpec :Mounts])
        (map (fn [v] {:containerPath (:Target v)
                      :hostPath      (:Source v)
                      :type          (:Type v)

      :state (->service-state replicas replicas-running service-mode)
      :status {:info   (->service-info-status replicas replicas-running service-mode)
               :update (->service-update-status service)}
      :ports (->service-ports service)
      :networks (->service-networks service networks)
      :mounts (->service-mounts service)
      :secrets (->service-secrets service)
      :variables (->service-variables service)
      :deployment (->service-deployment service)
      :tasks (->tasks service-tasks nodes service-name service-mode))))

(defn ->services

    (array-map
      :id service-id
      :version (get-in service [:Version :Index])
      :createdAt (date (:CreatedAt service))
      :updatedAt (date (:UpdatedAt service))
      :repository {:image       image-name
                   :imageDigest image-digest
                   :name        (first image-segments)
