moved event handler list code into its own module