clean up command line opts
add notes on json query tools
handle parse errors, tweak logging
implement debug logging, fix logging format string
clean up code
more cleanup