Major refactoring of dto.