Added "NewCodec" function