remodeled GUI

Improved some code and further developed the GUI. Still needs more work.