Events & tests refactoring