Added support for external hooks for event binding and dispatching.
...