Refactor to new server API.