clean chat.c