Initializing the arrays to sort the results on list pages
Added sorting by location.name to try it out