Nested Loop Duplicate Removal