Updated readme and added code snippets.