Simplyify GUI code