A simple event dispatching implementation