Fixed issue where connect hangs when no hosts

Also added configuration options
Fixed options issues