Updated the gui-main file with a class based architecture. Previous code
still available though commented out.