     }
     return .Success
   }
-}
+
+  func interactWithSimulator(translator: EventSinkTranslator, _ eventName: EventName, _ subject: SimulatorControlSubject, interact: FBSimulatorInteraction -> Void) throws {
+    translator.reportSimulator(eventName, EventType.Started, subject)
+    let interaction = translator.simulator.interact()
+    interact(interaction)
+    try interaction.performInteraction()
+    translator.reportSimulator(eventName, EventType.Ended, subject)
+  }
+}

      case .List:
        translator.reportSimulator(EventName.List, simulator)
      case .Approve(let bundleIDs):
        translator.reportSimulator(EventName.Approve, EventType.Started, bundleIDs as NSArray)
        try simulator.interact().authorizeLocationSettings(bundleIDs).performInteraction()
        translator.reportSimulator(EventName.Approve, EventType.Ended, bundleIDs as NSArray)
      case .Boot(let maybeLaunchConfiguration):
        let launchConfiguration = maybeLaunchConfiguration ?? FBSimulatorLaunchConfiguration.defaultConfiguration()!
        translator.reportSimulator(EventName.Boot, EventType.Started, launchConfiguration)
        try simulator.interact().prepareForLaunch(launchConfiguration).bootSimulator(launchConfiguration).performInteraction()
        translator.reportSimulator(EventName.Boot, EventType.Ended, launchConfiguration)
      case .Shutdown:
        translator.reportSimulator(EventName.Shutdown, EventType.Started, self.simulator)
        try simulator.interact().shutdownSimulator().performInteraction()
        translator.reportSimulator(EventName.Shutdown, EventType.Ended, self.simulator)
      case .Diagnose:
        let logs = simulator.diagnostics.allDiagnostics() as! [FBSimulatorDiagnostics]
        translator.reportSimulator(EventName.Diagnose, EventType.Discrete, logs as NSArray)

        try simulator.pool!.deleteSimulator(simulator)
        translator.reportSimulator(EventName.Delete, EventType.Ended, self.simulator)
      case .Install(let application):
        try interactWithSimulator(translator, EventName.Install, application) { interaction in
          interaction.installApplication(application)
        }
      case .Launch(let launch):
        try interactWithSimulator(translator, EventName.Launch, launch) { interaction in
          if let appLaunch = launch as? FBApplicationLaunchConfiguration {
            interaction.launchApplication(appLaunch)
          }
          else if let agentLaunch = launch as? FBAgentLaunchConfiguration {
            interaction.launchAgent(agentLaunch)
          }
        }
      case .Relaunch(let appLaunch):
        try interactWithSimulator(translator, EventName.Relaunch, appLaunch) { interaction in
          interaction.launchOrRelaunchApplication(appLaunch)
        }
      case .Terminate(let bundleID):
        try interactWithSimulator(translator, EventName.Relaunch, bundleID as NSString) { interaction in
          interaction.terminateApplicationWithBundleID(bundleID)
        }
      }
    } catch let error as NSError {
      return .Failure(error.description)
