       (auto_trigger . 1))))
 
 (defun ycmd-running? ()
+  "Tells you if a ycmd server is already running."
   (interactive)
   (if (get-process ycmd-server-process) 't nil))
 
 (defun ycmd-create-options-file (hmac-secret)
+  "This creates a new options file for a ycmd server.
+
+This creates a new tempfile and fills it with options. Returns
+the name of the newly created file."
   (let ((options-file (make-temp-file "ycmd-options"))
         (options (ycmd-options-contents hmac-secret)))
     (with-temp-file options-file
       (insert (ycmd-json-encode options)))
     options-file))
 
-(defun ycmd-open (filename)
-  (interactive
-  (list
-   (read-file-name "Filename: ")))
-  (ycmd-close)
-  (let ((hmac-secret (ycmd-generate-hmac-secret)))
-    (ycmd-start-server hmac-secret)
-    (setq ycmd-hmac-secret hmac-secret)
-    (ycmd-load-conf-file filename)))
-
-(defun ycmd-close ()
-  (interactive)
-  (if (ycmd-running?)
-      (delete-process ycmd-server-process)))
-
 (defun ycmd-start-server (hmac-secret)
+  "This starts a new server using HMAC-SECRET as its HMAC secret."
   (let ((proc-buff (get-buffer-create "*ycmd-server*")))
     (set-buffer proc-buff)
     (erase-buffer)

                                        ((eq k json-null)  "{}"))))
    (json-encode obj)))

(define-hmac-function ycmd-hmac-function
  (lambda (x) (secure-hash 'sha256 x nil nil 1))
  64 64)

(defun ycmd-options-contents (hmac-secret)
  (let ((hmac-secret (base64-encode-string hmac-secret)))
    `((filetype_blacklist (vimwiki . 1) (mail . 1) (qf . 1) (tagbar . 1) (unite . 1) (infolog . 1) (notes . 1) (text . 1) (pandoc . 1) (markdown . 1))
      (auto_start_csharp_server . 1)

(require 'json)
(require 'request)

;; Public: Things users might need to use.

(defcustom ycmd-host "127.0.0.1"
  "The host on which the ycmd server is running."
  :type '(string)
