Changes to add search results sorting