Introduce network.c

Introduce network code (currently commented out)