Fix minor bugs.
Add API usage example.