Bug fix: closing of window doesn't delete GUI object
Made GUI return groupings as well