Improved server api and client.