Nishant's changes to implement pub-sub in the mediator