Add support for entity references