Refactor music scanner