Improve examples in core documentation

This commit improve the examples in the documentation of the core
components by adding a new example and fixing mistakes in other
examples.