Add message creation functions
Implment message encode function