Moved the key generator to the Domain Object