More invite tests

Total restructuring for testability