Server code update

Update to server code allowing it to run as an async task.