Made defaultConnectAttempts to maxConnectAttempts, moved value to config file.