Improved url parsing.