Refactor the audio player