Visual Studio Patch

Microsoft Visual Studio's C++ Compiler (cl) finds multiple syntax and compile errors with the code.
These changes attempt to resolve some of those critical compile errors that prevent compilation.