Some refactoring. Make sure we only try to look at CSV files.
Some cleanup