Refactor soundplayer