major cleanup of network and geo visualization code