Finished implementation of server