Updated to compile on VisualStudio2010