Added docs to readme.md and added comments to example