add first kdb C tests
improve docu + examples
make states even more clear