Add limited direct decoding
Imporve direct decoding