re #579: commenting improvements and slight additions (e.g. added check for whether there are more than 1 gateway on the node)