Refactor 'all' variant to be more functional