getServer method for Client thread + other minor changes