New TLV decoding functions. Add a test program for these.