Optimized url parsing