Refactor to simplify message view model and logic for posting message.