changed cmake
renamed some funcs and variable