 (defvar vimgolf-start-buffer-name "*vimgolf-start*")
 (defvar vimgolf-end-buffer-name "*vimgolf-end*")
 (defvar vimgolf-keystrokes-buffer-name "*vimgolf-keystrokes*")
-
-; Prevent the server from compressing the response
-(setq url-mime-encoding-string "identity")
-
-; Put url-http-end-of-headers in current scope
-(defvar url-http-end-of-headers)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Keystroke logging

    (json-read)))

(defun vimgolf-setup (status challenge-id)
  (setq response (read-json challenge-id))

  (vimgolf-clear-keystrokes)
  (setq vimgolf-prior-window-configuration (current-window-configuration)
        vimgolf-challenge challenge-id)
  (goto-char (point-min))

  (let* ((start-text (get-text 'in response))
         (end-text   (get-text 'out response)))
    (vimgolf-kill-existing-session)

    (let ((vimgolf-start-buffer (get-buffer-create vimgolf-start-buffer-name))

    (when (get-buffer buf)
      (kill-buffer buf))))

(defun vimgolf-get-text (var response)
  (format "%s" (assoc-default 'data (assq var response))))

(defun vimgolf-retrieve-challenge (challenge-id)
  (interactive)
  (with-current-buffer
      (url-retrieve-synchronously (vimgolf-challenge-url challenge-id))
