Finished the code for generating the tidy output dataset.