fix link to objects that are not contained in a resource
small refactoring between addObject and addRootObject
fix tmp save of non contained elements