   bufferSize = 1024
   commands = []
   uploading = false
+  isComplete = false
 
   # Helper function for making errors purty.
   getErrorDetails = (url, type, data, textStatus, errorThrown) ->


  # Tells the server we are done benchmarking and halts all command processing.
  complete = ->
    if !uploading
      postToServer "complete"
      commands = []
    else # Need to wait for buffer upload to complete.
      setTimeout complete 100

  message = (text) ->
    outBuffer += text

  getFromServer("commands",
    ((data) ->
      commands = $.parseJSON(data)
      if not $.isArray commands
        error("Retrieved commands are not in an array format.")
    )
  )

  # When the console is 'clicked', the test begins. Doppio automatically clicks
  # the console when loading completes.
  container.click(-> extern.reprompt())

  return extern
