Changes to get code to compile in VS 2012