   constructor: (context) ->
     log.info 'CodapConnect: initializing'
     GraphStore = require '../stores/graph-store'
+    @standaloneMode = false
+    @queue = []
     @graphStore = GraphStore.store
     @lastTimeSent = @_timeStamp()
     @sendThrottleMs = 300
 
-    # Create a new case for each experiment:
-    SimulationStore.actions.createExperiment.listen   @_openNewCase.bind(@)
-
-    SimulationStore.actions.recordingFramesCreated.listen  @_addData.bind(@)
+    SimulationStore.actions.recordingFramesCreated.listen  @addData.bind(@)
 
     CodapActions.sendUndoToCODAP.listen @_sendUndoToCODAP.bind(@)
     CodapActions.sendRedoToCODAP.listen @_sendRedoToCODAP.bind(@)

      values: {
        operation: 'redoAction'
      }

  _flushQueue: ->
    for data in @queue
      @_sendSimulationData data
    @queue = []

  sendUndoableActionPerformed: (logMessage) ->
    @codapPhone.call

        # We check for game state in either the frame (CODAP API 2.0) or the dataContext
        # (API 1.0). We ignore the dataContext if we find game state in the interactiveFrame
        state = frame?.values.savedState or
                context?.values.contextStorage?.gameState

        if state?
          @graphStore.deleteAll()
