Add row validation

Merging in tested code for checking individual rows for duplicates.