Refactoring code for response uris.