Converted MessageWrapper into message classes hierarchy