Partway through the great D3 refactor.