Rework message handling, edit the tests for plugins