Reordered updates of values. Changed name to num_bytes to something closer to what it is. Addes support for mean value calculation.
Changed output to mean value.