anchor.diff:    (<:script :type "text/javascript" :src "res/json2.js")
     (<:script :type "text/javascript" :src "res/client.js"))
   
  -(defun templ::chat-area ()
  +(defun chat-area ()
     (<:div :class "main-area"
            (<:div :class "chat-area"
                   (<:div :class "chat-box" :id "chat-box")
  -                (templ::user-input-area))
  -         (templ::ooc-area)))
  -
  -(defun templ::ooc-area ()
  +                (user-input-area))
  +         (ooc-area)))
  +
  +(defun ooc-area ()
     (<:div :class "ooc-area"
            (<:div :class "ooc-display" :id "ooc-display")
            (<:form :class "user-input-area" :id "ooc-input-area"
  
positive.code:       (<:meta :http-equiv "Content-type"
                :content "text/html;charset=UTF-8")
        (<:link :rel "stylesheet" :type "text/css" :href "res/styles.css")
        (templ::jquery-libs)
        (when head-fun (funcall head-fun)))
       (<:body
        (funcall body-fun)))))
  
  (defmacro defpage (name lambda-list (&rest head) title &body body)
    `(defun ,name ,lambda-list
       (templ::page ,title
                    (lambda ()
                      ,@body)
                    ,@(when head
                       `((lambda () ,@head))))))
  
  (defun templ::jquery-libs ()
    (<:link :rel "stylesheet" :type "text/css" :href "res/css/smoothness/jquery-ui-1.8.14.custom.css")
    (<:script :type "text/javascript" :src "res/js/jquery-1.5.1.min.js")
    (<:script :type "text/javascript" :src "res/js/jquery-ui-1.8.14.custom.min.js"))
  
  (defun templ::login-component ()
    (<:form :name "login" :action "/login" :method "post"
            (<:label (<:ah "Log in"))
            (<:br)
            (<:label (<:ah "Email"))
            (<:text :name "account-name")
            (<:br)
            (<:label (<:ah "Password"))
            (<:input :type "password" :name "password")
            (<:br)
            (<:submit :value "Submit")))
  
  (defun templ::logout-button ()
    (<:form :class "logout-button" :action "/logout" :method "post"
            (<:submit :class "btn" :value "Log Out")))
  
  (defun templ::error-messages ()
    ;; This one's a bit leaky. It's pretty special, anyway.
    (when-let ((errors (session-value 'errors)))
      (<:ul :class "errors"
            (mapc (lambda (err) (<:li (<:ah err))) errors))
      (setf (session-value 'errors) nil)))
  
  ;;; 404
  (defpage templ::404 () ()
      "404 Not Found"
    (<:p (<:ah "Sorry, that page does not exist.")))
  
  ;;; /
  (defpage templ::/ () ()
      "Sykosomatic.org Dev Site"
    (<:p (<:ah "Sykosomatic is a cooperative storytelling system, currently in development. ")
         (<:href "/login" (<:ah "Log in.")))
    (<:p (<:ah "Already logged in? What are you doing here?! Head to the ")
         (<:href "/stage" (<:ah "Stage!"))))
  
  ;;; /login
  (defpage templ::login () ()
      "Log in"
    (templ::error-messages)
    (templ::login-component)
    (<:href "/signup" (<:ah "Create account.")))
  
  ;;; /stage
  (defpage templ::stage () ((templ::gameplay-js-libs))
      "All the World's a Stage"
    (templ::chat-area)
    #+nil
    (templ::scene-recording)
    #+nil
    (templ::scene-list-link)
    #+nil
    (templ::logout-button))
  
  (defun templ::gameplay-js-libs ()
    ;; When you feel like figuring out why optional loading fails, take the following
    ;; two lines out...
    (<:script :type "text/javascript" :src "res/swfobject.js")
  
negative.code:           (<:submit :value "Submit")))
  
  ;;; /newchar
  (defpage newchar () ()
      "Create a character"
    (error-messages)
    (character-creation-component))
  
  (defun character-creation-component ()
    (<:form :name "create-character" :action "/newchar" :method "post"
            (<:label (<:ah "Create a character."))
            (<:br)
  