Refactor background music to fix some possible issues and smooth out transitions