refactorings on domain layer