Adding handler now updates a handler if registered

When a handler was added, there was no check whether the pattern was already registered. Now, if the pattern is registered, it is updated. It may be better to throw an error, or add a update flag, but for my use case, updating the handler is correct.

In any case, it is an error to add two handlers with same pattern.