Major improvement to URL parsing