Refactoring code and tests to reflect new event model