Add test for handshake start

Also, fix issues to make it pass
Refine and test the exchange model

Refine and test the exchange model up to the handshake step