fixed bug caused by shadowing of local variable kw
enhanced test app API
more docstrings
refactored snippets
code style
work on docs