Tweaked the msg_list code so that the head and tail pointers