could you not simplify this bit ```config.switches && config.switches.adverts``` to ```'adverts' in config.switches``` as your always guaranteed to have ```config.switches```.