Rewrite client lib to use channels
Update examples to use new lib
Merge branch 'feature/clientlib' into develop