More refactoring (e.g., into a message handler class).