Added class Client with client logic. Needs more separation from GUI.