Added DEBUG command.  Re-wrote controller as a simple class with no GUI.