Improvements to csv format