Made a crude command line version to work without the GUI.
Needs to be updated to accept command line arguments.