                         (->> (io-key (:inputs-outputs @state))
                              (map :name)
                              (map (juxt identity #(get-text refs (str ref-prefix "_" %))))
-                             (remove (comp empty? val))
                              (into {})))]
        (swap! state assoc :blocker "Updating...")
        (endpoints/call-ajax-orch
-        {:endpoint (endpoints/update-workspace-method-config workspace-id (ws-common/config->id config))
-         :payload (assoc config
-                    :name name
-                    :rootEntityType root-entity-type
-                    :inputs (deref-vals :inputs "in")
-                    :outputs (deref-vals :outputs "out")
-                    :methodRepoMethod (merge (:methodRepoMethod config)
-                                             ((@refs "methodDetailsViewer") :get-fields))
-                    :workspaceName workspace-id)
-         :headers utils/content-type=json
-         :on-done (fn [{:keys [success? get-parsed-response]}]
-                    (swap! state dissoc :blocker :editing?)
-                    (if success?
-                      (do ((:on-rename props) name)
-                          (swap! state assoc :loaded-config (get-parsed-response) :blocker nil))
-                      (comps/push-error-response (get-parsed-response false))))})))
+         {:endpoint (endpoints/update-workspace-method-config workspace-id (ws-common/config->id config))
+          :payload (assoc config
+                     :name name
+                     :rootEntityType root-entity-type
+                     :inputs (deref-vals :inputs "in")
+                     :outputs (deref-vals :outputs "out")
+                     :methodRepoMethod (merge (:methodRepoMethod config)
+                                              ((@refs "methodDetailsViewer") :get-fields))
+                     :workspaceName workspace-id)
+          :headers utils/content-type=json
+          :on-done (fn [{:keys [success? get-parsed-response]}]
+                     (swap! state dissoc :blocker :editing?)
+                     (if success?
+                       (do ((:on-rename props) name)
+                           (swap! state assoc :loaded-config (get-parsed-response) :blocker nil)
+                           (utils/log))
+                       (comps/push-error-response (get-parsed-response false))))})))
    :load-validated-method-config
    (fn [{:keys [state props]}]
      (endpoints/call-ajax-orch
-      {:endpoint (endpoints/get-validated-workspace-method-config (:workspace-id props) (:config-id props))
-       :on-done (fn [{:keys [success? get-parsed-response status-text]}]
-                  (if success?
-                    (let [response (get-parsed-response)]
-                      (endpoints/call-ajax-orch
-                       {:endpoint endpoints/get-inputs-outputs
-                        :payload (get-in response [:methodConfiguration :methodRepoMethod])
-                        :headers utils/content-type=json
-                        :on-done (fn [{:keys [success? get-parsed-response]}]
-                                   (if success?
-                                     (swap! state assoc :loaded-config response :inputs-outputs (get-parsed-response))
-                                     (swap! state assoc :error (:message (get-parsed-response)))))}))
-                    (swap! state assoc :error status-text)))}))
+       {:endpoint (endpoints/get-validated-workspace-method-config (:workspace-id props) (:config-id props))
+        :on-done (fn [{:keys [success? get-parsed-response status-text]}]
+                   (if success?
+                     (let [response (get-parsed-response)]
+                       (endpoints/call-ajax-orch
+                         {:endpoint endpoints/get-inputs-outputs
+                          :payload (get-in response [:methodConfiguration :methodRepoMethod])
+                          :headers utils/content-type=json
+                          :on-done (fn [{:keys [success? get-parsed-response]}]
+                                     (if success?
+                                       (swap! state assoc :loaded-config (utils/log response) :inputs-outputs (get-parsed-response))
+                                       (swap! state assoc :error (:message (get-parsed-response)))))}))
+                     (swap! state assoc :error status-text)))}))
    :load-new-method-template
-   (fn [{:keys [state refs]} new-snapshot-id]
+   (fn [{:keys [state refs props]} new-snapshot-id]
      (let [[method-namespace method-name] (map (fn [key]
                                                  (get-in (:loaded-config @state)
                                                          [:methodConfiguration :methodRepoMethod key]))
                                                [:methodNamespace :methodName])
            config-namespace+name (select-keys (get-in @state [:loaded-config :methodConfiguration])
-                                              [:namespace :name])
+                                              [:namespace :name :rootEntityType])
            method-ref {:methodNamespace method-namespace
                        :methodName method-name
                        :methodVersion new-snapshot-id}]
        (swap! state assoc :blocker "Updating...")
-       ((@refs "methodDetailsViewer") :load-agora-method {:namespace method-namespace
+       (utils/log "METHOD REF")
+       (utils/log method-ref)
+       (react/call :load-agora-method (@refs "methodDetailsViewer") {:namespace method-namespace
                                                           :name method-name
                                                           :snapshotId new-snapshot-id})
        (endpoints/call-ajax-orch
-        {:endpoint (endpoints/create-template method-ref)
-         :payload method-ref
-         :headers utils/content-type=json
-         :on-done (fn [{:keys [success? get-parsed-response]}]
-                    (let [response (get-parsed-response)]
-                      (if success?
-                        (endpoints/call-ajax-orch
-                         {:endpoint endpoints/get-inputs-outputs
-                          :payload (:methodRepoMethod response)
-                          :headers utils/content-type=json
-                          :on-done (fn [{:keys [success? get-parsed-response]}]
-                                     (swap! state dissoc :blocker :wdl-parse-error)
-                                     (let [template {:methodConfiguration (merge response config-namespace+name)}]
-                                       (if success?
-                                         (swap! state assoc
-                                                :loaded-config (assoc template
-                                                                 :invalidInputs {}
-                                                                 :validInputs {}
-                                                                 :invalidOutputs {}
-                                                                 :validOutputs {})
-                                                :inputs-outputs (get-parsed-response))
-                                         (swap! state assoc :error (:message (get-parsed-response))))))})
-                        (do
-                          (swap! state assoc :blocker nil :wdl-parse-error (:message response))
-                          (comps/push-error (style/create-server-error-message (:message response)))))))})))})
+         {:endpoint (endpoints/create-template method-ref)
+          :payload method-ref
+          :headers utils/content-type=json
+          :on-done (fn [{:keys [success? get-parsed-response]}]
+                     (let [response (get-parsed-response)]
+                       (if success?
+                         (endpoints/call-ajax-orch
+                           {:endpoint (endpoints/get-validated-workspace-method-config (:workspace-id props) (:config-id props))
+                            :on-done (fn [{:keys [success? get-parsed-response status-text]}]
+                                       (let [valid-response (get-parsed-response)]
+                                         (if success?
+                                           (endpoints/call-ajax-orch
+                                             {:endpoint endpoints/get-inputs-outputs
+                                              :payload (:methodRepoMethod response)
+                                              :headers utils/content-type=json
+                                              :on-done (fn [{:keys [success? get-parsed-response]}]
+                                                         (swap! state dissoc :blocker :wdl-parse-error)
+                                                         (let [template {:methodConfiguration (merge valid-response config-namespace+name)}]
+                                                           (if success?
+                                                               (swap! state assoc
+                                                                      ;:loaded-config (utils/log (merge template (dissoc valid-response :methodConfiguration)))
+                                                                      :loaded-config valid-response
+                                                                      :inputs-outputs (get-parsed-response)))
+                                                             (swap! state assoc :error (:message (get-parsed-response)))))})
+                                           (swap! state assoc :error status-text))))})
+                         (do
+                           (swap! state assoc :blocker nil :wdl-parse-error (:message response))
+                           (comps/push-error (style/create-server-error-message (:message response)))))))})))})
                                       :style {:width 500}}))
           (when-not editing?
             (or field-value [:span {:style {:fontStyle "italic"}} "No value entered"]))]
          (when error
            [:div {:style {:padding "0.5em" :marginBottom "0.5rem"
                           :backgroundColor (:exception-state style/colors)
                           :display "inline-block"

                          :backgroundColor (:background-light style/colors)
                          :border style/standard-line :borderRadius 2}}
            (str name ": (" (when optional "optional ") type ")")]
           (when (and error (not editing?) (not optional))
             (icons/icon {:style {:marginLeft "0.5rem" :alignSelf "center"
                                  :color (:exception-state style/colors)}}
                         :error))
