Broker refactoring