Fix some code to match .NET Code Standard