Simplify download url logic