Dump an object to a ostream.
Clean up CLI.