Added config file support
Encodes and decodes the basic message structure