Improved Network implementation a little.
Removed new, new is bad, use make_shared or make_unique instead.