Typo correction and add elements in reference documentation

The goal is to make the examples self-contained to make easier copy/paste/test from reference documentation.