refactor routerregistrar to allow registration of arbitrary URIs