Changes to support v2 of the API.