Refactor algorithms' testers.