csvextractor refactoring, now usable as a command