Refactoring to OpProcessor to handle message validation and errors.