A proper URI object should be passed around.  Wrote it and its unit tests, which may be the first ever unit tests for phpWebSite code.