Refactor music playing