I don't think we have to define all of these upfront. We can just add to the properties object on the fly:

```
if (activity.actor['oae:collection']) {
    properties.actor1Obj = activity.actor['oae:collection'][0];
    if (activity.actor['oae:collection'].length > 1) {
        properties.actorCount = activity.actor['oae:collection'].length;
        properties.actor2 = encodeForHTML(activity.actor['oae:collection'][1].displayName);
        properties.actor2URL = encodeForHTML(activity.actor['oae:collection'][1]['oae:profilePath']);
    }
} else {
    properties.actor1Obj = activity.actor;
}
properties.actorCountMinusOne = properties.actorCount - 1;
properties.actor1 = encodeForHTML(properties.actor1Obj.displayName);
properties.actor1URL = encodeForHTML(properties.actor1Obj['oae:profilePath']);
```