Add csv output function. But, does not work correctly. WIP
go fmt
Before refactoring.
Changed persistence method. csv to sqlite3.