Adding better event management