Round one of refactoring for Master API changes.