(URI Cleanup) Improved tests for URI assertions. Minor code cleanup