Added documentation for the metadata feature

This includes examples and references.