FIX: missing concat call in Priority encoder. Various improvements to Codec.