Added some tests, CLI invite changed a bit