add some API functions, rework callback invocation
add API tests
rework documentation