Mediator implementation using requirejs.