factored out URI stuff into diff namespaces.