Added code snippets to README.md.