Add support for references and named entities.
Add support for references and named entities.

The previously unfinished support for named entities was completed and support
for references added.

SeNeReKo/TCFlib