Register mediators

Closes #147 

@rcrichton if you could please review?
Yeah. My feeling is let's leave the updates for now, it's clearly a bit complex.