Update version to 0.3.1 and bug fixing

- cleaning and line termination for csv files