Refactor a lot of the Message-related code into Message class from Messenger.