Fix de duplicating reader algorithm and test it more thoroughly
Remove debug statements