Fix logic error.
Added example how to use the API.
Merge branch 'add-examples' into development