Change the command line handling and added proper help / version messages. Removed lelgacy options and clutter.
Added proper command line documentation (usage on error, version etc). Exported some code from the main function to subs to simplify code reading.
Added proper command line handling (success error, help, version). Fixed the array output problem using a string builder and removing the last comma added.