Moved some config code into ConfigHelper.cs
Added client TLS and multisocket support