Separate out the string parsing and CSV marshalling so that the string
parsing can be used by other projects.