Restructure config to support multiple instances of gateway with different configuration parameters

You need to document what this parameter structure means. It's not obvious to newcomers what this means.