- A bit of refactoring. Pi now has its own class

- Automatically detects the # of out.csv files