New GUI related stuff + a bit of refactoring!