Reorg/improve security groups templates