Fixing some minor errors and performing in cascade the methods add and delete relations into the datamodel.