Reworked the csv writer and data providers