Added support for referenced models to beans.
Added support for referenced models to beans.