renaming, fix cmake for factory tests, improve cmake for header files