CSV simplified

Greatly simplified csv generation.