Miscellaneous cleanup in DerivedCodec and ImplicitCodec