better handling of csv output mode, converts from command style to csv style.  Allows for inclusion of all commands and less branching in functions