 (defun receive-view-internal (status context)
   (let ((json (json-read-from-string (strip-http-headers (buffer-string))))
       (editable (is-readwrite-context context)))
-  (debug-message (concat "mode provided: " (get-mode context)))
-  (debug-message (concat "editable: " (if editable "T" "F")))
-  (debug-message (concat "context before: " (json-encode context)))
-  (debug-message (concat "global context before: " (json-encode brain-bufferlocal-context)))
     (if status
       (show-http-response-status status json)
-  (debug-message (concat "mode before: " (get-mode)))
       (let (
         (view (get-value 'view json))
         (root-id (get-value 'root json))
         (height (numeric-value json 'height nil)))
-          (brain-switch-to-buffer (name-for-view-buffer root-id json) context)
+          (switch-to-buffer (name-for-view-buffer root-id json) context)
           (receive-context json context)
-  (debug-message (concat "context after: " (json-encode context)))
-  (debug-message (concat "global context after: " (json-encode brain-bufferlocal-context)))
-  (debug-message (concat "root: " root-id))
-  (debug-message (concat "json: " (json-encode json)))
           (if (equal (get-mode) brain-const-search-mode)
               ;; Always leave a search view with height 1, rather than that of the last view.
               ;; The user experience is a little unpredictable otherwise.
               (setq brain-current-height 1)
               (if height (setq brain-current-height height)))
           (erase-buffer)
-  (debug-message "got the view...")
-   (debug-message (concat "mode after: " (get-mode)))
-         (write-view editable (get-value 'children view) 0)
+          (write-view editable (get-value 'children view) 0)
           (beginning-of-buffer)
           (setq visible-cursor t)
           ;; Try to move to the corresponding line in the previous view.

(defun set-view-properties (view-properties &optional context) (set-bufferlocal context 'view-properties view-properties))
(defun set-view-style (view-style &optional context) (set-bufferlocal context 'view-style view-style))

(defun set-search-mode (context)
    (set-mode brain-const-search-mode context)
    (set-line 1 context))

(defconst NIL "none")

(defun default-context () (list

    (define-key brain-mode-map (kbd "C-c C-i f")       'brain-find-isolated-atoms)
    (define-key brain-mode-map (kbd "C-c C-i r")       'brain-remove-isolated-atoms)
    (define-key brain-mode-map (kbd "C-c l")           'brain-goto-line-prompt)
    (define-key brain-mode-map (kbd "C-c C-r f")       'brain-import-freeplane-prompt)
    (define-key brain-mode-map (kbd "C-c C-r g")       'brain-import-graphml-prompt)
    (define-key brain-mode-map (kbd "C-c C-s C-m")     'brain-set-min-sharability-prompt)
    (define-key brain-mode-map (kbd "C-c C-t C-a b")   'brain-navigate-to-target-atom-alias)
    (define-key brain-mode-map (kbd "C-c C-t C-b a")   (brain-visit-in-amazon 'current-target-value))
