Added 'total' to the IP end condition (thanks Jon!!!).

Cleaned up ip_demo.