Refactored message sending