added ability to consume table_gateways as keys for config
improvements