Created MainThread and created better GUI setup, with server check