export feature: csv (for mysql or other db)
Updated code indentation and formatting.
Refactored CSV main function and updated csv fields.