Refactor the message constructors.