Updated README with example and revamped the existing code snippets.