major reorganization; still doesn't make /etc/gateways correctly