More refactoring of the network data structure