Added mediator pattern.