cleaned up audio code