Minor refactoring for the message classes.