   (if (get-buffer vimgolf-start-buffer-name) (kill-buffer vimgolf-start-buffer-name))
   (if (get-buffer vimgolf-work-buffer-name) (kill-buffer vimgolf-work-buffer-name))
   (if (get-buffer vimgolf-end-buffer-name) (kill-buffer vimgolf-end-buffer-name))
-  (vimgolf-open-dribble-file nil)
+  (vimgolf-stop-capture-keystrokes)
   (set-window-configuration vimgolf-prior-window-configuration)
   (message "I declare you, n00b!"))
 


(defvar vimgolf-working-window-configuration nil)

(defvar vimgolf-dribble-file-path (expand-file-name "vimgolf-dribble" temporary-file-directory))

(defvar vimgolf-keystrokes-file-path (expand-file-name "vimgolf-keystrokes" temporary-file-directory))

(defvar vimgolf-work-buffer-name "*vimgolf-work*")
(defvar vimgolf-start-buffer-name "*vimgolf-start*")
(defvar vimgolf-end-buffer-name "*vimgolf-end*")

(defun vimgolf-kill-existing-session ()
  (if (get-buffer vimgolf-start-buffer-name) (kill-buffer vimgolf-start-buffer-name))
  (if (get-buffer vimgolf-work-buffer-name) (kill-buffer vimgolf-work-buffer-name))
  (if (get-buffer vimgolf-end-buffer-name) (kill-buffer vimgolf-end-buffer-name))
  (if (get-buffer vimgolf-keystrokes-buffer-name) (kill-buffer vimgolf-keystrokes-buffer-name)))

;;;###autoload
(defun vimgolf (challenge-id)
  "Open a VimGolf Challenge"
  (interactive "sChallenge ID: ")
  (vimgolf-clear-keystrokes)
  (setq vimgolf-prior-window-configuration (current-window-configuration)
        vimgolf-challenge challenge-id)
  (let ((vimgolf-yaml-buffer (url-retrieve-synchronously (vimgolf-challenge-url challenge-id)))
