Object-oriented GUI code