Extract process_search and process_issues functions