Started factoring business logic out of the GUI