Messages classes refactored.