fix: MSVC warnings part 2 (and some variable type changes)