Refactoring message service. Adding more tests.
Fixing threading... again.
More threading fixes with the messageService integrated in.