Added a debug display function to GUI
Sorted various files