Some cleanup of the newtworks scanning code