Updated code to implement the Family persistence functionality