Refactoring GUI into separate file