Fixed tests, added comments, and remove all images if threshold is met