Support Events

Add support for the new event system.