Better parsing of URLs
Fix selection problems