Minor cleanup of the audio recording code