GUI: Refactoring of the gui parts. Not finished jet.