Added some more comments and renamed SetCodec to SetCurrentCodec