gui fix + debug settings for CMakeLists.txt
some refactoring