Added possibilities to work with different representation types of messages.