tidied Decoder while looking for possible memory leak