clean up code, document command line parameters, convert output to use "show" (which respects verbose setting), put in object and array detection in "show".