Improved url normalization