Refactoring and testing events.