Changes to support protocol 6

changes to support not equals comparison of sequence numbers,
added the ack_timeout event
fixed typos, finished implementation (buggy)