Started extracting code from the GUI application