Improve url extraction