Refactor and complete implementation of data level decoding.

Refactor allows extracting the knowledge of what decoding to use with
each product to live with the rest of the product-specific information,
removing the big if switches. Also implement the remainder of the
special cases.