Small refactor to be more MSVC friendly.