A bunch of windows warnings and cleanups #622