Added support for global event handlers