Refactor event handler composition