Fix test, reorganize network.h