add findDecoderForData; misc code cleanup