Adding support for embedded documents