More terra refactoring.