finish up clib

some minor aesthetical thing, and testing with the channel database
works.
TODO:
put a test in examples, and test the derivatives too.