Added test, code and docs for the glossary function.