Refactored search urls to include sorting