Mediator response

Closes #148 

@devcritter could you review this for me? I also refactored some of the router code cos it think it was getting difficult to read.