   (with-current-buffer (get-buffer-create vimgolf-work-buffer-name)
     (delete-region (point-min) (point-max))
     (insert-buffer (get-buffer-create vimgolf-start-buffer-name))
-    (clear-dribble-file)
+    (vimgolf-clear-keystrokes)
     (set-window-configuration vimgolf-working-window-configuration)
     (message "If at first you don't succeed, try, try again.")))
 
 (defun vimgolf-diff ()
   "Pause the competition and view differences between the buffers."
   (interactive)
-  (vimgolf-open-dribble-file nil)
+  (vimgolf-stop-capture-keystrokes)
   (ediff-buffers (get-buffer-create vimgolf-work-buffer-name) (get-buffer-create vimgolf-end-buffer-name))
   (message "Remember to `C-c C-v c` when you're done."))
 
 (defun vimgolf-continue ()
   "Restore work and end buffers and begin recording keystrokes again."
   (interactive)
-  (vimgolf-open-dribble-file vimgolf-dribble-file-path)
+  (vimgolf-capture-keystrokes)
   (set-window-configuration vimgolf-working-window-configuration)
   (message "Golf away!"))
 
 (defun vimgolf-pause ()
   "Stop recording keystrokes."
   (interactive)
-  (vimgolf-open-dribble-file nil)
+  (vimgolf-stop-capture-keystrokes)
   (message "Come `C-c C-v c` soon."))
 
 (defun vimgolf-quit ()

    (eq 0 (compare-buffer-substrings
           (get-buffer vimgolf-work-buffer-name) (point-min-in-buffer vimgolf-work-buffer-name) (point-max-in-buffer vimgolf-work-buffer-name)
           (get-buffer vimgolf-end-buffer-name) (point-min-in-buffer vimgolf-end-buffer-name) (point-max-in-buffer vimgolf-end-buffer-name)))))

(defun vimgolf-close-and-capture-dribble ()
  (with-current-buffer (find-file-noselect vimgolf-dribble-file-path)
    (append-to-file (point-min) (point-max) vimgolf-keystrokes-file-path)
    (kill-buffer))
  (open-dribble-file nil))

(defun vimgolf-open-dribble-file (file)
  (if file (open-dribble-file file) (vimgolf-close-and-capture-dribble)))

(defun vimgolf-wrong-solution ()
  (message "Wrong!")

(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)))
