Added preliminary support for a gui

This commit is a perliminary support for a more managable gui interface,
it should work, but has not been tested.