AudioPlayer refactoring and bluetooth fixes