Implemented export as CSV with geometries
Refactor code