Fixing up more warnings and errors under Visual Studio 2010.