Cleaning up data and files for next iteration.