Updated URL parsing