Refactoring code. Redefined TagPacket struct and keytag_init to support the new imple...