Provide toString to state for debugging.
Fix handshake signaling and some cleanup
Add warnings on failure paths and clean up.