URI handling improvments