fixed incorrect csv format defaults
fixed incorrect csv parsing and generation
additional unit tests for csv parsing and generation