PudCodec refactoring