Updates to improve C# code