I've noticed in my programs sometimes the GUI controls things and calls the guts, other times the guts control the program and calls the GUI. Take Sudoku for example. You could write a solver such ...