Add docstrings to example program.
Add unittest example.