WIP - still bugs in the refactored invite scripts