Better parsing of urls