Refactoring of the event reporter with testing