Implemented Encoder/Decoder (in support of #2)