Some small refactorings concerning the events.