Made some changes to the MessageBroker logic.
- Avoid closures
- Don't keep working if the broker was disposed.
Merge branch 'release' into dev