Refactoring domain layer. #41