Add example, refactor for rpc channels