Add DEBUG_DECODE and some basic debugging of the decoding process.