Rename message_decoder to message_generator.
Refactor class AbstractMessageGenerator and its subclasses.