Added API function to find orphaned entries