Minor event handler refactoring.