Refactor setting the role and setting the unregdate into there owning functions