Changed join on duplicate files from cross to inner join to make it more performant and right thing to do.
The SelectedItem changed event isnt working anymore so needs to be fixed.