Update ips.c

Code cleanup.