Extract type constants and reuse them in Decoder
Add support for extension types