Some fixes and adaptations on changes trevent code. Add a simple echo client.