Added basic event system.