Basic changes to compile in .NET 4.0