Starting to decentralize encoding, adding test for message encoder