Added CSVData and CSVRecord classes and refactor