Clean up invitation code