Conversion to .NET 4.0