Modified script to produce tidy data file