Tweaked NetworkTest, some code cleanup. Thanks mmark!