Gui refactoring.