Constexpr not supported in MSVC, fixing other miscellaneous MSVC compiler errors

- [x] Fix unit test on Windows