client.c cleaned