Messaging refactoring