-Refactored code from GUI to business logic