Refactoring Tenants API to allow for updating host names and fixing a caching issue