Feature/referential integrity