Stop iterate short, and remove more duplication.