csv and many small required changes

csv and many small required changes