Rework command line options parsing code for some tools
9 files changed