Simplified ProcessThreadIPs() function.