Format function extracted into header file and made MSVC compatible
SImplifying of cmake configs