Refactor invitations