Refactored deliverMessage to not alter the to property of a message