Untested generic URI factory. Relates to #2.