Helper trait for event handling