Improved vindecoder and unittests for it.