Cleaned up GUI entry point code