Refactor event bus