Fixed majority of POSIX naming warnings and rest of the level 3 warnings (MSVC). Removed remaining warnings with _CRT_NO_WARNINGS definition.