Preliminary work for CSV generation