applied some important code changes, improved control if domain is null and changed while to for to read connector properties from its configuration
delete an unuseful comment