Adds fixes to example code

Jira-issue: API-43
Merge pull request #40 from mlasak/API43

Adds fixes to example code