URI parsing is ugly