Adjusted the min similarity and added garbage collection