Refactoring GUI stuff
Refactoring