some cleanups and tweaks from actually using the CLI

Just getting the user IO working correctly.  Fixing a couple of
bugs related to running cmds via the CLI (which isn't tested right
now).