modulate the project to separate command-line and GUI application