added flushing, wrap around in ips, an error in calculating next ip, writing correct ip to file, extensive commenting. Changed to allow 256 * 256 iterations.