Refactoring domain. Not tested!