Clean up sound recorder code