Clean up and minor API change.

Some intermediate changes required whilst working on the integration with AS8 domain management.