Added nested documents stuff, not the way I would like, but at least it does not break anymore if yoi have nested documents.
Added a test class to experiment with the dynamic object creation