cosmetic changes, added relay text code, fixed code in setPacketFunction