cleanup and fixup the codecs