Add the encoder class and supporting files