Better structure within the Gui

Restructured gui to be more Object Oriented. Some customization is also
added.