Refactored messaging mechanism