           @save_to_server(interactive_json, @learner_url)
         else
           # wait a bit and try again:
-          window.setTimeout () =>
+          window.setTimeout( =>
             @save_to_server(interactive_json, @learner_url)
-          ,
-          500
+          , 500)
       @iframePhone.addListener 'getAuthInfo', =>
-        authInfo = { provider: @auth_provider, loggedIn: @logged_in}
+        authInfo = {provider: @auth_provider, loggedIn: @logged_in}
         if @user_email?
           authInfo.email = @user_email
         @iframePhone.post('authInfo', authInfo)
       @iframePhone.addListener 'extendedSupport', (opts)=>
         if opts.reset?
           @should_show_delete = opts.reset
-          if @has_saved_state
+          if @saved_state
             if @should_show_delete
               @$delete_button.show()
             else
               @$delete_button.hide()
 
       if @put_url
-        #Save interactive every 42 seconds just to be safe:
-        window.setInterval (()=> @save()), 42 * 1000
+        #Save interactive every 5 seconds just to be safe:
+        window.setInterval (()=> @save()), 5 * 1000
       @iframePhone.post('getExtendedSupport')
       @iframePhone.post('getLearnerUrl')
       # TODO: There used to be a callback for model_did_load
       # hopefully this will work
       model_did_load()
 
-    @iframePhone      = new iframePhone.ParentEndpoint(iframe, phone_answered)
-
+    @iframePhone = new iframePhone.ParentEndpoint(iframe, phone_answered)
 
 
   @default_success: ->

      window.location.reload()
    @confirm_delete () =>
      @learner_url = null
      @save_to_server(null,"")

  save_to_server: (interactive_json, learner_url) ->
    return unless @put_url
    runSuccess = =>
      if @success_callback
        @success_callback()
      else
        @default_success
    if interactive_json is "nochange"
      runSuccess()
      return

        if response['raw_data']
          interactive = JSON.parse(response['raw_data'])
          if interactive
            @saved_state = interactive
            @iframePhone.post({type: 'loadInteractive', content: interactive})
            @$delete_button.show() if @should_show_delete == null or @should_show_delete
      error: (jqxhr, status, error) =>
        @error("couldn't load interactive")

# Export constructor.
window.IFrameSaver = IFrameSaver

$(document).ready ->
