Refactoring GUI and other classes.