Added paginating to search functions.