Now detects new gateways and keeps a list of unique ones.