renamed stateMtx to mtx
removed exchangeEntry
removed the run loop
Removed the handler and replaced it with the Listener API
Fixed endpoint termination
Merge pull request #23 from telehash/endpoint-refactor

Endpoint refactor