Little more modularization.  VERY basic dupe detection.