Improved option parsing
Fixes option parsing
CSV support and improved flag parsing