Create Network API

Added a Network API which can send and receive any data type. Data is sent with a string tag which allows it to be identified as being for a particular part or thread of a function. Updated main.py and control.py to use this API. NB: main and control still don't work but this pull is just for networking functionality which is now complete and will make it easier to identify problems in main.p and control.py