fixed newnetwork tests & code cleanup