Use new libchan interface

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Merge pull request #115 from aanand/new-libchan-interface