Added number to cookie request/response packets to prevent possible
DoS issue.
Some more code written for the middle level protocol stuff.