Initial version of decoder.