Moved template code to the Domain project.