Finished basic implementation of server