Committing a working version of the AdaptiveDecoder. It doesn't adapt yet, only decodes. Has been tested.