Updated to generally work and save statistics from semi-sucessful runs.