Refactor batch selection tasks