Using much simpler logic to filter duplicate items
initial isolation of model
Removing unused variable