adds basic network stuff
adds write functions for Messages