diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index c7d5349..859297f 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -31,6 +31,7 @@
     <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
     <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
     <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/test/netstd/Client/Performance/PerformanceTests.cs b/test/netstd/Client/Performance/PerformanceTests.cs
index f9eb9e4..c1f00dd 100644
--- a/test/netstd/Client/Performance/PerformanceTests.cs
+++ b/test/netstd/Client/Performance/PerformanceTests.cs
@@ -34,10 +34,10 @@
 {
     public class PerformanceTests
     {
-        private CancellationTokenSource Cancel;
-        private CrazyNesting Testdata;
-        private TMemoryBufferTransport MemBuffer;
-        private TTransport Transport;
+        private CancellationTokenSource Cancel = new();
+        private CrazyNesting? Testdata;
+        private TMemoryBufferTransport? MemBuffer;
+        private TTransport? Transport;
         private LayeredChoice Layered;
         private readonly TConfiguration Configuration = new();
 
@@ -76,52 +76,49 @@
             }
         }
 
-        private Task<TProtocol> GenericProtocolFactory<T>(bool forWrite)
+        private async Task<TProtocol> GenericProtocolFactory<T>(bool forWrite)
             where T : TProtocol
         {
             var oldTrans = Transport;
             try
             {
+                Transport = null;
+
                 // read happens after write here, so let's take over the written bytes
                 if (forWrite)
                     MemBuffer = new TMemoryBufferTransport(Configuration);  
                 else
-                    MemBuffer = new TMemoryBufferTransport(MemBuffer.GetBuffer(), Configuration);
+                    MemBuffer = new TMemoryBufferTransport(MemBuffer?.GetBuffer(), Configuration);
 
                 //  layered transports anyone?
-                switch (Layered)
+                Transport = Layered switch
                 {
-                    case LayeredChoice.None:
-                        Transport = MemBuffer;
-                        break;
-                    case LayeredChoice.Framed:
-                        Transport = new TFramedTransport(MemBuffer);
-                        break;
-                    case LayeredChoice.Buffered:
-                        Transport = new TBufferedTransport(MemBuffer);
-                        break;
-                    default:
-                        Debug.Assert(false);
-                        break;
-                }
+                    LayeredChoice.None => MemBuffer,
+                    LayeredChoice.Framed => new TFramedTransport(MemBuffer),
+                    LayeredChoice.Buffered => new TBufferedTransport(MemBuffer),
+                    _ => throw new Exception("Unhandled case " + Layered.ToString()),
+                };
+                ;
 
                 if (!Transport.IsOpen)
                     Transport.OpenAsync().Wait();
 
-                var instance = (T)Activator.CreateInstance(typeof(T), Transport);
-                return Task.FromResult<TProtocol>(instance);
+                if (Activator.CreateInstance(typeof(T), Transport) is T instance)
+                    return instance;
+
+                throw new Exception("Unexpected.");
             }
             finally
             {
-                if (oldTrans is IDisposable)
-                    (oldTrans as IDisposable).Dispose();
+                oldTrans?.Dispose();
             }
         }
 
         private string GetProtocolTransportName(TProtocol proto)
         {
-            var name = Transport.GetType().Name;
-            if (name.Equals(MemBuffer.GetType().Name))
+            var name = Transport?.GetType().Name;
+            var bufnm = MemBuffer?.GetType().Name;
+            if ((name is null) || name.Equals(bufnm))
                 name = string.Empty;
             else
                 name = " + " + name;
@@ -135,6 +132,9 @@
         {
             var stop = new Stopwatch();
 
+            if ((Testdata is null) || (Transport is null))
+                throw new Exception("unexpected internal state");
+
             var proto = await factory(true);
             stop.Start();
             await Testdata.WriteAsync(proto, Cancel.Token);
diff --git a/test/netstd/Client/Performance/TestDataFactory.cs b/test/netstd/Client/Performance/TestDataFactory.cs
index 9896285..833947c 100644
--- a/test/netstd/Client/Performance/TestDataFactory.cs
+++ b/test/netstd/Client/Performance/TestDataFactory.cs
@@ -26,7 +26,7 @@
     
     static class TestDataFactory
     {
-        public static CrazyNesting CreateCrazyNesting(int count = 10)
+        public static CrazyNesting? CreateCrazyNesting(int count = 10)
         {
             if (count <= 0)
                 return null;
@@ -78,13 +78,15 @@
 
         private static Dictionary<Numberz, long> CreateUserMap(int count)
         {
-            var retval = new Dictionary<Numberz, long>();
-            retval.Add(Numberz.ONE, count);
-            retval.Add(Numberz.TWO, count);
-            retval.Add(Numberz.THREE, count);
-            retval.Add(Numberz.FIVE, count);
-            retval.Add(Numberz.SIX, count);
-            retval.Add(Numberz.EIGHT, count);
+            var retval = new Dictionary<Numberz, long>
+            {
+                { Numberz.ONE, count },
+                { Numberz.TWO, count },
+                { Numberz.THREE, count },
+                { Numberz.FIVE, count },
+                { Numberz.SIX, count },
+                { Numberz.EIGHT, count }
+            };
             return retval;
         }
 
@@ -138,9 +140,10 @@
 
         private static Dictionary<Insanity, string> CreateListFieldDataDictValueListDict(int count)
         {
-            var retval = new Dictionary<Insanity, string>();
-            retval.Add(CreateInsanity(count), string.Format("data level {0}", count));
-            return retval;
+            return new Dictionary<Insanity, string>
+            {
+                { CreateInsanity(count), string.Format("data level {0}", count) }
+            };
         }
 
         private static byte[] CreateBytesArray(int count)
diff --git a/test/netstd/Client/TestClient.cs b/test/netstd/Client/TestClient.cs
index 38bccf1..0a7fa00 100644
--- a/test/netstd/Client/TestClient.cs
+++ b/test/netstd/Client/TestClient.cs
@@ -71,12 +71,12 @@
             public string host = "localhost";
             public int port = 9090;
             public int numThreads = 1;
-            public string url;
-            public string pipe;
+            public string url = string.Empty;
+            public string pipe = string.Empty;
             public LayeredChoice layered = LayeredChoice.None;
             public ProtocolChoice protocol = ProtocolChoice.Binary;
             public TransportChoice transport = TransportChoice.Socket;
-            private readonly TConfiguration Configuration = null;  // or new TConfiguration() if needed
+            private readonly TConfiguration Configuration = new();
 
             internal void Parse(List<string> args)
             {
@@ -210,7 +210,7 @@
                     "keys/",
                 };
 
-                string existingPath = null;
+                var existingPath = string.Empty;
                 foreach (var possiblePath in possiblePaths)
                 {
                     var path = Path.GetFullPath(possiblePath + clientCertName);
@@ -234,8 +234,7 @@
             public TTransport CreateTransport()
             {
                 // endpoint transport
-                TTransport trans = null;
-
+                TTransport trans;
                 switch (transport)
                 {
                     case TransportChoice.Http:
diff --git a/test/netstd/Server/Server.csproj b/test/netstd/Server/Server.csproj
index 7d5eb17..cda1dff 100644
--- a/test/netstd/Server/Server.csproj
+++ b/test/netstd/Server/Server.csproj
@@ -31,6 +31,7 @@
     <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
     <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
     <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/test/netstd/Server/TestServer.cs b/test/netstd/Server/TestServer.cs
index 65458d6..515a299 100644
--- a/test/netstd/Server/TestServer.cs
+++ b/test/netstd/Server/TestServer.cs
@@ -36,6 +36,7 @@
 
 #pragma warning disable IDE0063  // using can be simplified, we don't
 #pragma warning disable IDE0057  // substr can be simplified, we don't
+#pragma warning disable CS1998   // await missing
 
 namespace ThriftTest
 {
@@ -74,7 +75,7 @@
         internal TransportChoice transport = TransportChoice.Socket;
         internal ServerChoice server = ServerChoice.Simple;
         internal int port = 9090;
-        internal string pipe = null;
+        internal string pipe = string.Empty;
 
         internal void Parse(List<string> args)
         {
@@ -166,7 +167,7 @@
         public static int _clientID = -1;  // use with Interlocked only!
         #pragma warning restore CA2211
 
-        private static readonly TConfiguration Configuration = null;  // or new TConfiguration() if needed
+        private static readonly TConfiguration Configuration = new(); 
 
         public delegate void TestLogDelegate(string msg, params object[] values);
 
@@ -180,10 +181,10 @@
                 return Task.CompletedTask;
             }
 
-            public Task<object> CreateContextAsync(TProtocol input, TProtocol output, CancellationToken cancellationToken)
+            public async Task<object?> CreateContextAsync(TProtocol input, TProtocol output, CancellationToken cancellationToken)
             {
                 callCount++;
-                return Task.FromResult<object>(null);
+                return null;
             }
 
             public Task DeleteContextAsync(object serverContext, TProtocol input, TProtocol output, CancellationToken cancellationToken)
@@ -201,7 +202,7 @@
 
         public class TestHandlerAsync : ThriftTest.IAsync
         {
-            public TServer Server { get; set; }
+            //public TServer Server { get; set; }
             private readonly int handlerID;
             private readonly StringBuilder sb = new();
             private readonly TestLogDelegate logger;
@@ -520,7 +521,7 @@
                 "keys/",
             };
                         
-            string existingPath = null;
+            var existingPath = string.Empty;
             foreach (var possiblePath in possiblePaths)
             {
                 var path = Path.GetFullPath(possiblePath + serverCertName);
@@ -595,7 +596,7 @@
                     }
 
                     // Layered transport (mandatory)
-                    TTransportFactory transFactory = null;
+                    TTransportFactory? transFactory;
                     switch (param.buffering)
                     {
                         case BufferChoice.Framed:
