More GUI refactoring