Major refactoring, Introduced event handling