cleaned up tests and examples, restored formatted error messages for command line client