Initial commit of examples

The initial commit of examples and the API to be used
Ported from python examples
Move API in line with development branch

Keep this version of API in line with stable dev branch