Some DDD refactoring.