Updated Xtract.java to handle bad and duplicate data