changes to the mediator pattern, added some notes also