More robust event system