Add the script used for averaging over multiple runs as well as the necessary changes.