Various fixes
decodutil almost ready