Tidy
Optimised the lookup query
Fixed family Id not being database generated
Fixed family