Better parsing of urls

better parsing of relative urls