Added missing call for ProcessThreadIPs().
Small change in style.
Removed excessive optimizations.