Update of GUI main class

Not a lot of changes here, just a change of code layout