tidied up the message sending in to a few sub methods
Moved the message sending logic in to it's own class.