eventbus integration and refactoring