MessageBroker needs a refactor due to presence of hard pointers and it fails when the referenced pointer is deleted, making the whole system crash.
It is related to #7
It should also remove the deleted listener upon deletition.