Combined the main and gui files