more csv generation cleanup