GUI Code Cleanup