Moved event-sending into its own module.