Make GUI work, minor fixes in main executable