Computing max number of ticks needed for program to finish, then using it in run script.
Fixed per-tick computation of packet info.