more comprehensive tests
more comprehensive tests
refactored code.
new examples.