Updates to fix compile errors and warnings when using the Visual Studio compiler