Extract extractUris and refactor extractUris.