Refactoring: split CollectProperties into two separate function objects.