Moved some of the delete code from receiver.c to here and implemented