TTS refactoring