DEV: Add encoder/decoder + improvement