Updated server code with some more functions fleshed out. Will need to test.