Updated documentation with code snippets.