Removed most of the warnings seen when compiling using MSVC.