Added an example. API improvements.