Refactored CreateInvitation