Refactor transcript_ajax.