minor refactoring and fixes in invitecontributor