Minor refactoring of the transcoder code