Sorting out gui mess