code cleanup and transcription callback methods