-finish refactoring GUI