Second version. This integrates a GUI.