Rewritten the api and added extra examples
Rewritten the api and added extra examples