Massive refactor of msvc stuff.