Updating the switch() for message processing.