Codec code cleanup