TLS instead of SSL3 and compilation fixes

TLS instead of SSL3, Resolved ambiguous call to X509Certificate2 constructor, and removed a bunch of unnecessary using statements and references assemblies.