remove message pack function from ichat.c and some other small changes