This is a great idea with a slick implementation.
__I made these mods on a train journey without the ability to test them!__ I believe them to be correct but please run the app to make sure that IGot it right.
Here is why you should avoid [] or {} as default value for function params:
```python
def func0(subdomains=[]):
print('before', subdomains)
subdomains.append(1)
print(' after', subdomains)
func0()
func0()
print('-' * 10)
def func1(subdomains=None):
subdomains = subdomains or []
print('before', subdomains)
subdomains.append(1)
print(' after', subdomains)
func1()
func1()
print('')
```