Change parsing function to use switch

Because this is how long it's been since I've written C++.
Changed the main parsing loop to use a switch statement instead
of a bunch of if-else's.
Allow for multiple output columns

accomodate the passing of any number of additional
 output columns to the end of the call.