Refactoring transcription scripts