Improve mediator extension

- Keep track of events attached to sandboxes to be able to clean them.
- Add tests.
Add start and stop method in widget