Add Decoder base class, make decoder classes more consistent.