Make events and event handlers generic.