Clean up the music implementation heavily, removing redundant code and splitting off some code into utilities.