C# code with proper variable naming and simplified expressions.