refactor ctest scripts, remove CTest module usage