Removed inconsistency with found
Duplicate handling done
Fixed some more general bugs