Better URL parsing