       return unless xhr.readyState == 4
       return unless xhr.status == 200
       jsonString = xhr.responseText
-      @load(jsonString)
-      @checkpoint()
-      Apparatus.refresh() # HACK: calling Apparatus seems funky here.
+      @loadJsonStringIntoProjectFromExternalSource(jsonString)
     xhr.open("GET", url, true)
     xhr.send()
 

  _setupRevision: ->
    # @current is a JSON string representing the current state. @undoStack and
    # @redoStack are arrays of such JSON strings.
    @current = @save()
    @undoStack = []
    @redoStack = []
    @maxUndoStackSize = 100

  # TODO: get version via build process / ENV variable?
  version: "0.4.1"

  loadJsonStringIntoProject: (jsonString) ->
    json = JSON.parse(jsonString)
    # TODO: If the file format changes, this will need to check the version
    # and convert or fail appropriately.
    if json.type == "Apparatus"
      @project = @serializer.dejsonify(json)

  loadJsonStringIntoProjectFromExternalSource: (jsonString) ->
    @loadJsonStringIntoProject(jsonString)
    @checkpoint()
    Apparatus.refresh()  # HACK: calling Apparatus seems funky here.

  getJsonStringOfProject: ->
    json = @serializer.jsonify(@project)
    json.type = "Apparatus"
    json.version = @version
