   # Reply with the new data
   $scope.done = -> liaison.done 
     comment: $scope.name
-    send: _.object(([output, input] for {input: input, output: output} in $scope.pins))
+    params: convertPinsToModel($scope.pins)
   $scope.cancel = -> liaison.cancel() 

    throw new Error("Cannot find simple destination for parameter '#{name}'")

  findParameterReferences = (name, outValues) ->
    return ({ drain: drain, source: source } for drain, source of outValues when expression.indexOf("params.#{name}") != -1)

  # Convert between "param form" used in game serialization and "pin form" used in GUI
  $scope.LINKAGES = ["simple", "custom"]

  else
    throw new Error("Model is not an action or switch")

  # TODO: refactor into function
  $scope.pins = []
  for paramName, paramDef of typeDef.paramDefs
    pin = 
