Visual Studio Patch

Code had several compile errors using Microsoft Visual Studio's C++ Compiler (cl).
These changes attempt to resolve some of the more critical compile errors.