Tenancy model for user testing

and a few small refactors