Feature/8359

Adding mediator functionality, and tests.