Added a lot of networking code and edited the Makefile for dependencies.