Implemented finding orphan records and delete