more cleanup.
got basic relationships working

added support for embedded documents.