Uri append fix

These are several small changes to fix some ugliness in the URI handling that I noticed while putting my demo together.