changing message data classes to inherit from new Data class.