code: function addHandler(handlerType, type, a, b) {
      if (typeof type !== 'string') {
        console.error('Thorin.action: ' + handlerType + ' type ' + type + " of action " + this.name + ' is not a string.');
        return this;
      }
      var item;
      if (type === HANDLER_TYPE.MIDDLEWARE || type === HANDLER_TYPE.AUTHORIZE) {  // we have type, name, fn
        if (typeof a !== 'string' || typeof b !== 'function') {
          console.error('Thorin.action: ' + handlerType + ' middleware "' + a + '" must have syntax: ' + handlerType + '(type, middlewareName, fn) in action ' + this.name);
          return this;
        }
        item = {
          name: a,
          fn: b
        };
      } else {
        item = {};
        if (typeof a === 'function') {
          item.fn = a;
        } else if (typeof a === 'string' && typeof b === 'function') {
          item.name = a;
          item.fn = b;
        }
        if (typeof item.fn !== 'function') {
          console.error('Thorin.action: ' + handlerType + ' "' + type + '" must have syntax: ' + handlerType + '(type, fn) or (type, targetName, fn) in action ' + this.name);
          return this;
        }
      }
      if (typeof this.events[handlerType][type] === 'undefined') {
        this.events[handlerType][type] = [];
      }
      this.events[handlerType][type].push(item);
      return this;
    }
docs: /* Adds an event handler, either a before or an after