Refactored message transmission