Implemented proper export_to_csv() method.