made minor improvments on Clement data set flattening script locally