anchor.diff:  
   (defclass module ()
     ((%active :initform NIL :accessor active :allocation :class)
  -   (%handlers :initform (make-hash-table :test 'equal) :reader handlers :allocation :class)
  -   (%commands :initform (make-hash-table :test 'equal) :reader commands :allocation :class)
  -   (%groups :initform (make-hash-table :test 'equal) :reader groups :allocation :class)
  -   (%threads :initform (make-hash-table :test 'equalp) :accessor threads))
  +   (%threads :initform (make-hash-table :test 'equalp) :accessor threads :allocation :class))
     (:documentation "Base module class."))
   
  -(defmethod active ((null null)) NIL)
  -(defmethod active ((module-name symbol))
  -  (active (get-module module-name)))
  -(defmethod active ((module-name string))
  -  (active (get-module module-name)))
  +(defmacro generalize-module-accessor (name)
  +  `(progn
  +     (defmethod ,name ((module-name string))
  +       (,name (get-module ,module-name)))
  +     (defmethod ,name ((module-name symbol))
  +       (,name (get-module ,module-name)))))
  +
  +(generalize-module-accessor active)
  +(generalize-module-accessor threads)
   
   (defmethod print-object ((module module) stream)
     (format stream "<[~a]>" (class-name (class-of module))))
  -
  -(defclass command ()
  -  ((%name :initform (error "Name required.") :initarg :name :accessor name)
  -   (%args :initform () :initarg :arguments :accessor cmd-args)
  -   (%func :initform (error "Function required.") :initarg :function :accessor cmd-fun)
  -   (%docu :initform NIL :initarg :documentation :accessor docu))
  -  (:documentation "Class for module commands."))
   
   (defgeneric start (module)
     (:documentation "Start the module and activate it for use.")
  
positive.code:   "Returns the module of the current package context."
    (get (package-symbol package) :module))
  
  (defun display-help (module group event)
    "Responds with help about a specific command or the entire group."
    (if (cmd-args event)
        (let ((group-command (get-group-command module group (first (cmd-args event)))))
          (when group-command
            (respond event "~a" (docu group-command))
            (respond event "USAGE: ~a ~a ~{~a~^ ~}" group (name group-command) (cmd-args group-command))))
        (progn
          (respond event (docu (get-command module group)))
          (respond event "Commands: ~{~a ~}" (hash-table-keys (get-group module group))))))
  
  (defmacro define-module (name direct-superclasses direct-slots &body options)
    "Define a new module class. See DEFCLASS."
    (let ((instancesym (gensym "INSTANCE"))
          (definedsym (gensym "DEFINED")))
      `(progn 
         (defclass ,name (module ,@direct-superclasses)
           ((%active :initform NIL :reader active :allocation :class)
            (%handlers :initform (make-hash-table :test 'equal) :reader handlers :allocation :class)
            (%commands :initform (make-hash-table :test 'equal) :reader commands :allocation :class)
            (%groups :initform (make-hash-table :test 'equal) :reader groups :allocation :class)
            ,@direct-slots)
           ,@options)
         (let ((,instancesym (make-instance ',name))
               (,definedsym (gethash ,(intern (string-upcase name) "KEYWORD") *bot-modules*)))
           (when (active ,definedsym)
             (v:warn :colleen "Redefining started module ~a. Performing automatic stop and start." ,definedsym)
             (stop ,definedsym))
           (setf (get (package-symbol *package*) :module) ,instancesym
                 (gethash ,(intern (string-upcase name) "KEYWORD") *bot-modules*) ,instancesym)
           (when (active ,definedsym) (start ,instancesym)))))) 
  
  (defmacro define-group (name &key (module `(get-current-module)) documentation)
    "Define a new command group for a module.
  NAME designates the command name as a symbol.
  MODULE binds the group to this module, defaults to the current package-context module.
  DOCUMENTATION is an optional string giving some information about the command group."
    (let ((documentation (if documentation (format NIL "~a (Group)" documentation) "(Group)")))
      (destructuring-bind (method &optional (command method)) (if (listp name) name (list name))
        (setf command (string-downcase command))
        `(progn
           (add-group ,module ,command)
           (add-command 
            ,module ,command '(&rest rest) 
            #'(lambda (module event)
                (let* ((subcmd (or (first (cmd-args event)) "help"))
                       (command (gethash subcmd (gethash ,command (groups module)))))
                  (if command
                      (progn
                        (setf (command event) (format NIL ,(format NIL "~a ~~a" command) subcmd))
                        (setf (cmd-args event) (cdr (cmd-args event)))
                        (funcall (cmd-fun command) module event))
                      (progn
                        (v:debug :colleen "~a No method found for ~a!" module subcmd)
                        (respond event (fstd-message event :no-command))))))
            ,documentation)
           (define-command (,command help) (&rest args) (:documentation "Display command information." :module ,module :modulevar module)
             (declare (ignore args))
             (display-help module ',command event))))))
  
  (defmacro define-command (name (&rest args) (&key authorization documentation (eventvar 'event) (module `(get-current-module)) (modulevar 'module)) &body body)
    "Define a new command for a module.
  NAME is either the direct command name or a list of form (GROUP NAME).
  ARGS is a lambda-list org arguments expected for the command. Note that &key will not work.
  AUTHORIZATION, when not-NIL states that this command can only be used by users on the authenticated list. See AUTH-P.
  DOCUMENTATION is an optional string giving some information about the command.
  EVENTVAR is the symbol that the event variable is bound to in the body. Defaults to EVENT.
  MODULE binds the command to this module, defaulting to the current package-context module.
  MODULEVAR is the symbol that the module variable is bound to in the body. Defaults to MODULE."
    (destructuring-bind (group &optional (name group n-s-p)) (if (listp name) name (list name))
      (unless n-s-p (setf group NIL))
      (let ((methodgens (gensym "METHOD"))
            (errgens (gensym "ERROR")))
        `(let ((,methodgens
                 (lambda (,modulevar ,eventvar)
                   (declare (ignorable ,modulevar))
                   ,(when authorization
                      `(unless (auth-p (nick ,eventvar))
                         (error 'not-authorized :event ,eventvar)))
                   (handler-case
                       (destructuring-bind (,@args) (cmd-args ,eventvar)
                         ,@body)
                     ((or #+sbcl sb-kernel::arg-count-error 
                          #+sbcl sb-kernel::defmacro-lambda-list-broken-key-list-error
                          #+cmucl LISP::DEFMACRO-LL-ARG-COUNT-ERROR
                          #+cmucl LISP::DEFMACRO-LL-BROKEN-KEY-LIST-ERROR
                          #+abcl program-error
                          #+ccl CCL::SIMPLE-PROGRAM-ERROR
                          end-of-file) (,errgens)
                       (declare (ignore ,errgens))
                       (error 'invalid-arguments :command ',name :argslist ',args))))))
           ,(if group
                `(add-group-command ,module ',group ',name ',args ,methodgens ,documentation)
                `(add-command ,module ',name ',args ,methodgens ,documentation))))))
  
  (defmacro define-handler (event-type (&key (module `(get-current-module)) (modulevar 'module)) &body body)
    "Define a new event handler for a module.
  EVENT-TYPE designates the event-class that should be handled or a list of the form (EVENT-TYPE EVENTVAR).
  MODULE binds the handler to this module, defaulting to the current package-context module.
  MODULEVAR is the symbol that the module variable is bound to in the body. Defaults to MODULE."
    (destructuring-bind (event-type &optional (eventvar event-type)) (if (listp event-type) event-type (list event-type))
      `(add-handler 
        ,module ',event-type
        (lambda (,modulevar ,eventvar)
          (declare (ignorable ,modulevar))
          ,@body))))
  
  (defun start-module (&rest module-names)
    "Start up one or more modules. Each module name should be a symbol or string."
    (dolist (module-name module-names)
      (unless (keywordp module-name) (setf module-name (find-symbol (string-upcase module-name) "KEYWORD")))
      (with-simple-restart (skip "Skip starting the module.")
        (let ((module (get-module module-name)))
          (assert (not (null module)) () "Module ~a not found!" module-name)
  
negative.code:   (:method ((module module))))
  
  (defgeneric stop (module)
    (:documentation "Stop the module and attempt to clean everything up.")
    (:method :around ((module module))
      (setf (active module) NIL)
      (loop for uid being the hash-keys of (threads module)
  