More refactoring for .NET 4