Commented unused functions.
Added printing to file (code not corect).
Corrected analytical calculation.
Now using the real number of total iterations for bandwith.