added some cleanup bits to the transcode section