   (concat vimgolf-host (vimgolf-challenge-path challenge-id) vimgolf-challenge-extension))
 
 (defun vimgolf-scrub-buffer (buffer)
-  (save-current-buffer
-    (set-buffer buffer)
-    (goto-char (point-min))
+  (with-current-buffer buffer
+    (beginning-of-buffer)
     (re-search-forward data-end-regexp nil t)
     (delete-region (match-beginning 0) (point-max))
     (decrease-left-margin (point-min) (point-max) 4)
-    (goto-char (point-min))
+    (beginning-of-buffer)
     (vimgolf-mode t)))
 
 (defun vimgolf-kill-existing-session ()

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

(defun point-min-in-buffer (buffer)
  (save-current-buffer
    (set-buffer buffer)
    (point-min)))

(defun point-max-in-buffer (buffer)
  (save-current-buffer
    (set-buffer buffer)
    (point-max)))

(defun vimgolf-solution-correct-p ()

(defun vimgolf-revert ()
  "Revert the work buffer to it's original state and reset keystrokes."
  (interactive)
  (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)
