anchor.diff:           nil
            #+nil(list-user-character-names (session-value 'account-name)))))
   
  -;;;
  -;;; Handlers
  -;;;
  -
  -;;; Main page
  -(define-easy-handler (home :uri "/") ()
  +(defun render-page (title body-fun &optional head-fun)
     (with-yaclml-output-to-string
       (<:html
        (<:head
  -      (<:title "Sykosomatic.org Dev Site")
  -      (<:script  :type "text/javascript" :src "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"))
  +      (<:title (<:ah title))
  +      (<:script  :type "text/javascript" :src "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js")
  +      (when head-fun (funcall head-fun)))
        (<:body
  -      (<:p (<:ah "Sykosomatic is currently in development. ")
  -           (<:a :href "/login" (<:ah "Log in.")))
  -      (<:p (<:ah "Already logged in? What are you doing here?! Go ")
  -           (<:a :href "/play" (<:ah "play!")))))))
  +      (funcall body-fun)))))
  +;;;
  +;;; Handlers
  +;;;
  +
  +;;; Main page
  +(define-easy-handler (home :uri "/") ()
  +  (render-page "Sykosomatic.org Dev Site"
  +               (lambda ()
  +                 (<:p (<:ah "Sykosomatic is currently in development. ")
  +                      (<:a :href "/login" (<:ah "Log in.")))
  +                 (<:p (<:ah "Already logged in? What are you doing here?! Go ")
  +                      (<:a :href "/play" (<:ah "play!"))))))
   
   (define-easy-handler (play :uri "/play") (char)
  -  (declare (ignore char))
  -  (ensure-logged-in)
  -  (with-yaclml-output-to-string
  -    (<:html
  -     (<:head
  -      (<:title "Hello!")
  -      (<:link :rel "stylesheet" :type "text/css" :href "res/styles.css")
  -      (<:script  :type "text/javascript" :src "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js")
  -      ;; When you feel like figuring out why optional loading fails, take the following two lines out...
  -      (<:script :type "text/javascript" :src "res/swfobject.js")
  -      (<:script :type "text/javascript" :src "res/web_socket.js")
  -      (<:script :type "text/javascript" :src "res/ajaxlib.js"))
  -     (<:body
  -      (render-chat-box)
  -      (render-user-input-area)
  -      (render-logout-button)))))
  +  (ensure-logged-in)
  +  (render-page "Tell me a story"
  +               (lambda ()
  +                 (if (emptyp char)
  +                     (<:p (<:ah "No character selected."))
  +                     (render-chat-box))
  +                 (render-user-input-area)
  +                 (render-logout-button))
  +               (lambda ()
  +                 (<:link :rel "stylesheet" :type "text/css" :href "res/styles.css")
  +                 (unless (emptyp char)
  +                   ;; When you feel like figuring out why optional loading fails, take the following
  +                   ;; two lines out...
  +                   (<:script :type "text/javascript" :src "res/swfobject.js")
  +                   (<:script :type "text/javascript" :src "res/web_socket.js")
  +                   (<:script :type "text/javascript" :src "res/ajaxlib.js")))))
   
   ;;; Login/logout
   (define-easy-handler (login :uri "/login") (account-name password)
  
positive.code:              (appendf (session-value 'errors) errors)
               (redirect "/signup")))))
      (:get
       (with-yaclml-output-to-string
         (<:html
          (<:head
           (<:title "Character creation")
           (<:script :src "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" :type "text/javascript"))
          (<:body
           (render-error-messages)
           (render-character-creation-component)))))))
  
  (define-easy-handler (character-selection :uri "/charselect") ()
    (ensure-logged-in)
    (with-yaclml-output-to-string
      (<:html
       (<:head
        (<:title "Character Selection")
        (<:script  :type "text/javascript" :src "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"))
       (<:body
        (render-character-selection)
        (render-logout-button)))))
  
  ;;; Misc
  (define-easy-handler (ajax-ping :uri "/pingme") ()
    (ensure-logged-in))
  
negative.code:              (appendf (session-value 'errors) errors)
               (redirect "/signup")))))
      (:get
       (render-page "Sign up"
                    (lambda ()
                      (render-error-messages)
                      (render-signup-component))))))
  
  ;;; Characters
  (define-easy-handler (newchar :uri "/newchar") (name description)
  