Some improvements to csv parsing robustness.  Also support setting identity in the csv options.