refactoring: cleaning the code of gui part