ds_connect,ds_create_object completed, error hanlding in client and lib,refactoring