Key-exchange protocol send messages. (Not tested)
Fixed some bugs.