Fixing broken Sample API.

Renaming appropriate argument and expanding the API options.
Merge branch 'master' into issue_201