More mediator integration and clean up.