Adding the adaption code for the AdaptiveDecoder. The W matrix now adapts. However, it seems to adapt incorrectly. Still need to debug.